Bug: exception while importing (1 Viewer)

mts

Portal Pro
September 2, 2007
317
25
Home Country
Germany Germany
Code:
15.01.2013 15:29:15 - Processing Files.
15.01.2013 15:29:15 - ===================================================================================================
15.01.2013 15:29:28 -  File Updated (moved) - \\mediaserver1\Videos4\Filme\Das gibt Ärger.mkv - Das gibt Ärger -  Movie found by 'single result' automatch.
15.01.2013 15:29:47 - ErrorEvent : ErrorEvent importing Borat.ts : Der angegebene Pfad und/oder Dateiname ist zu lang. Der vollständig qualifizierte Dateiname muss kürzer als 260 Zeichen und der Pfadname kürzer als 248 Zeichen sein.,	bei System.IO.Path.SafeSetStackPointerValue(Char* buffer, Int32 index, Char value)
  bei System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
  bei System.IO.Path.NormalizePath(String path, Boolean fullCheck)
  bei System.IO.Path.GetFullPathInternal(String path)
  bei System.IO.FileInfo..ctor(String fileName)
  bei Grabber.GrabUtil.DownloadBacdropArt(String artFolder, String imageUrl, String title, Boolean multiImage, Boolean first, String& filename, Int32 downloadlimit, String resolutionMin, String resolutionMax)
  bei Grabber.Grabber_URLClass.GetFanart(String otitle, String ttitle, Int32 year, String director, String imdbid, String fanartPath, Boolean multiImage, Boolean choose, String MasterTitle, String personArtworkPath, Int32 downloadlimit, String resolutionMin, String resolutionMax)
  bei AMCUpdater.AntRecord.ProcessFile(ProcessModeNames ProcessMode)
15.01.2013 15:29:59 - ErrorEvent : ErrorEvent importing Super 8\VIDEO_TS.IFO : Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in Exception.InnerException. Fehler: Für den aktuellen Thread muss der STA-Modus (Single Thread Apartment) festgelegt werden, bevor OLE-Aufrufe ausgeführt werden können. Stellen Sie sicher, dass die Hauptfunktion mit STAThreadAttribute gekennzeichnet ist..,	bei AMCUpdater.My.MyProject.MyForms.Create__Instance__[T](T Instance)
  bei AMCUpdater.My.MyProject.MyForms.get_Form1()
  bei AMCUpdater.Module1.LogEvent(String EventString, EventLogLevel LogLevel)
  bei AMCUpdater.Module1.GetFileData(String FilePath, String DataItem)
  bei AMCUpdater.AntRecord.ProcessFile(ProcessModeNames ProcessMode)



If you need some more information, just tell me.
 

Attachments

  • MyFilmsAMCSettings_MainFilmDatabase.xml
    7.6 KB
  • MyFilms.xml
    24.4 KB

Guzzi

Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    ErrorEvent importing Borat.ts :
    Der angegebene Pfad und/oder Dateiname ist zu lang.
    Der vollständig qualifizierte Dateiname muss kürzer als 260 Zeichen und der Pfadname kürzer als 248 Zeichen sein.
    Try shortening the resulting path depth and see, if the error disappears.
     

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    I can't imagine that this helps as there are over 300 other movies in the same folder.
    The path to this movie is: "\\MEDIASERVER1\Recording\Borat.ts" which has a length of 33 signs.
     

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    Hi Guzzi,

    I downloaded the sourcecode and fixed it myself.
    There was one bug that a movie was added even though it was excluded because it is case-sensetive:
    Please change:
    Code:
    AntProcessor.vb  function UpdateXML():
     
    			Dim XMLExclTable As New Hashtable ' "always ignore" movies
    			If (File.Exists(CurrentSettings.Excluded_Movies_File)) Then
    				Dim sr As StreamReader = File.OpenText(CurrentSettings.Excluded_Movies_File)
    				Dim i As Integer = 0
    				Do While sr.Peek() >= 0
    					XMLExclTable.Add(i, sr.ReadLine)
    					i += 1
    				Loop
    				sr.Close()
    			End If

    to:

    Code:
    XMLExclTable.Add(i, sr.ReadLine.ToLower)

    The problem with the movie "Borrat" is, that the german title is "Borat - Kulturelle Lernung von Amerika um Benefiz für glorreiche Nation von Kasachstan zu machen" which is quite long and when you try to store the fanart, the total path is to long.
    A quick and dirty solution whould be to shorten titles to a max-length of around 50 characters.

    It breaks here:
    Code:
    Grab.cs  GetFanart()
     
    filename1 = GrabUtil.DownloadBacdropArt(fanartPath, backdrop, wtitle2, multiImage, first, out filename, downloadlimit, resolutionMin, resolutionMax);
     
    in detail:
    pubic ... DownloadBacdropArt()
    ...
    var newFile = new FileInfo(filename);
     
    Last edited:

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    Hi,

    there is another bug when I try to import a ripped DVD.
    When you try to get the size of a DVD folder, you use the function GetDVDFolderPath() which should imo return the folder of the '*.ts' file, but this functions returns the movie name and not the folder-path (see function descriptor).
    So I temporarily changed the function to:

    Code:
    Dim ldiTemp As New System.IO.DirectoryInfo(FileName)
     
    Return ldiTemp.Parent.FullName


    This works but I think you should keep the old function and rename it to something like GetMovieNameFromDVDFolderPath()
     
    Last edited:

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Hi mts,
    thanks a lot for your efforts on those issues. Will commit fixes so they're contained for next release.
    Not yet sure about the best approach with the file length problem (btw: who invents SUCH titles ! ;-))
     

    tbrg78

    Portal Member
    October 9, 2012
    26
    0
    44
    Home Country
    Germany Germany
    Hi,

    yes, ripped or copied dvd folders generate headaches. I was kind of "phew!..", after spending two evenings, trying to import all my movies from filesystem-folders with nfo-files and folder/fanart.jpg in there. Just as I thought I made it, i noticed every dvd-rip failed.. so no success, yet.. o(

    Code:
    25.01.2013 00:49:20 - ErrorEvent : ErrorEvent importing Auftrag Rache (2010)\VIDEO_TS.IFO : Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in Exception.InnerException. Fehler: Für den aktuellen Thread muss der STA-Modus (Single Thread Apartment) festgelegt werden, bevor OLE-Aufrufe ausgeführt werden können. Stellen Sie sicher, dass die Hauptfunktion mit STAThreadAttribute gekennzeichnet ist..,	bei AMCUpdater.My.MyProject.MyForms.Create__Instance__[T](T Instance)
      bei AMCUpdater.My.MyProject.MyForms.get_Form1()
      bei AMCUpdater.Module1.LogEvent(String EventString, EventLogLevel LogLevel)
      bei AMCUpdater.Module1.GetFileData(String FilePath, String DataItem)
      bei AMCUpdater.AntRecord.ProcessFile(ProcessModeNames ProcessMode)

    If there's something else I can do about it, please let me know. In case I can help track related issues down.. i will!

    @mts
    Is it possible to get your fix somehow ?!.. o)
     

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    You can try this importer. Please make a backup of the original application.

    (BTW I don't think this error is fixed in my version)
     

    Attachments

    • AMCUpdater.zip
      336.6 KB
    Last edited:

    tbrg78

    Portal Member
    October 9, 2012
    26
    0
    44
    Home Country
    Germany Germany
    Hi mts, thanks for your response.. o)

    Unfortunately, your AMCUpdater.exe just chrashes and throws an exception. It does not even open a window or something.. o)
    Additionally its size is about 0.5mb smaller than the version I tried before, why is that !?.. o)

    Thanks though!
     

    Attachments

    • Clipboard Image (1).png
      Clipboard Image (1).png
      65.8 KB
    Last edited:

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    Hi,

    I forgot that I didn't used the postCompiling-stuff to pack things together.
    At the attachment you will find everything to start the app.
     

    Attachments

    • AMCUpdater.zip
      2.9 MB

    Users who are viewing this thread

    Top Bottom