AMC Updater v0.7.3 Now Available! (2 Viewers)

OrionHall

Portal Pro
September 13, 2007
198
31
London
Home Country
United Kingdom United Kingdom
Thanks for the extra details Jamieo and Seco!

I think I can do a fairly easy to use 'global exclude keywords' function, so you can have a list of keywords (or regex expressions) which, if matched, will exclude certain files / folders from all processing. This would probably be split - one list for file exclusions and one for folder exclusions. I think that should be flexible enough to meet your needs, without affecting functionality for existing users.

It's turning out to be a bit fiddly to implement all this - I previously had separate codeblocks for 'Media data' and 'Internet data' - but now we have Original Title being both - it could be derived from the file / foldername, or it could be looked up online. So a fair few changes internally to make that work!

I'll post back when I have it up and running again,

Cheers,

Orion.
 

seco

Retired Team Member
  • Premium Supporter
  • August 7, 2007
    1,575
    1,239
    Home Country
    Finland Finland
    Excellent OrionHall :)

    I'm ready to test when there's something to test. Many thanks!
     

    z3us

    Portal Pro
    December 4, 2007
    1,047
    123
    46
    Home Country
    Spain Spain
    z3us - I'm still not sure how you want the DVD label feature to work. If you move files from the hard disk to a DVD then how would the Manual Updater work? I don't see how it could update the media label like that. It sounds like you should run the main scan against your DVD-ROM drive, and hopefully it will work out that the files have moved; update the location to d:\ (or whatever) and update the media label to match. Does that make sense?

    Cheerio,

    Orion.
    Yes, thats what I want. That it updates the source and media label fields, but leave the rest of fields intact.
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    z3us - I'm still not sure how you want the DVD label feature to work. If you move files from the hard disk to a DVD then how would the Manual Updater work? I don't see how it could update the media label like that. It sounds like you should run the main scan against your DVD-ROM drive, and hopefully it will work out that the files have moved; update the location to d:\ (or whatever) and update the media label to match. Does that make sense?

    Cheerio,

    Orion.
    Yes, thats what I want. That it updates the source and media label fields, but leave the rest of fields intact.

    Hi z3us,

    I've done some testing on this. You should be able to use the main importer function to do this, but not 'til the next release!

    The import routine checks to see if files have moved, however in the current version it will ONLY change the 'Source' field, and won't then update any other details you select. I've now corrected this and it'll be in the next version.

    So if you back up a load of files to DVD and remove them from your hard drive, you'll just have to run AMCUpdater pointing to your d: drive (or whatever) and select the 'Attempt to read DVD label' and just the 'Media Label' on the database fields tab. Of course this will need to be done for each DVD, but still quicker than manually updating the database!

    Cheers,

    Orion.
     

    jamieo

    Portal Member
    June 30, 2007
    20
    0
    Home Country
    England England
    Excellent, I look forward to the next release. :)

    ... but now we have Original Title being both - it could be derived from the file / foldername, or it could be looked up online.

    I may be missing something fairly obvious here but I don't understand the above comment. The option is to simply substitute the parent folder name as the original title instead of the filename - no more, no less. This would be in the initial scanning phase just to indicate what the title should be, the internet lookup can still be done as before but the search uses the foldername instead of the filename....

    Consider the psuedo code below, the code in red implementing the option to use the foldername instead:

    Code:
    [FONT="Courier New"]file = "M:\films\The Bourne Ultimatum\s-tbu.mkv"
    
    fieldSource = file
    
    [COLOR="DarkRed"][B]if useFolderName then
      fieldTitle = GetParentFolderName(file)
    else[/B][/COLOR]
      fieldTitle = GetFileTitle(file)
    
    if getInternetData then IMDBLookup(fieldTitle)[/FONT]

    Normally fieldTitle would be set to "s-tbu" and then the imdb search would be ran without finding a match. If the useFolderName option was enabled then the fieldTitle would be set to "The Bourne Ultimatum" instead and the imdb search should match this time.

    I think you may perceive the requested option to be more involved than it needs to be, hopefully the above clarifies that all it really needs to do is substitute the folder name instead when you initially set the movie title - then carry on as normal. I haven't done PC dev for a while so am not set up for it atm but if you like I could take a look at your current source and try to help out?

    Thanks again. :)

    Jamie
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    Excellent, I look forward to the next release. :)

    ... but now we have Original Title being both - it could be derived from the file / foldername, or it could be looked up online.

    I may be missing something fairly obvious here but I don't understand the above comment. The option is to simply substitute the parent folder name as the original title instead of the filename - no more, no less. This would be in the initial scanning phase just to indicate what the title should be, the internet lookup can still be done as before but the search uses the foldername instead of the filename....

    Consider the psuedo code below, the code in red implementing the option to use the foldername instead:

    Code:
    [FONT="Courier New"]file = "M:\films\The Bourne Ultimatum\s-tbu.mkv"
    
    fieldSource = file
    
    [COLOR="DarkRed"][B]if useFolderName then
      fieldTitle = GetParentFolderName(file)
    else[/B][/COLOR]
      fieldTitle = GetFileTitle(file)
    
    if getInternetData then IMDBLookup(fieldTitle)[/FONT]

    Normally fieldTitle would be set to "s-tbu" and then the imdb search would be ran without finding a match. If the useFolderName option was enabled then the fieldTitle would be set to "The Bourne Ultimatum" instead and the imdb search should match this time.

    I think you may perceive the requested option to be more involved than it needs to be, hopefully the above clarifies that all it really needs to do is substitute the folder name instead when you initially set the movie title - then carry on as normal. I haven't done PC dev for a while so am not set up for it atm but if you like I could take a look at your current source and try to help out?

    Thanks again. :)

    Jamie


    Thanks Jamie :D

    You have got slightly the wrong end of the stick though... Your pseudo code looks find, and exactly how it could work. The problem with doing this in Ant was two-fold though - GUI and code.

    In the code, the systems for updating file-based data (media information) was always completely separate from the Internet lookup code. Additionally, the Internet lookup code doesn't expose individual properties which can easily be referenced. Due to the complexity of performing the lookup in the first place, it runs once, when needed, and grabs all possible data for the given file. So the quick and dirty way of implementing these changes would have meant that potentially popping up twice trying to determine the correct movie for the lookup.

    The GUI issue is down to keeping it intuitive, as well as maintaining compatibility and trying to be 'everything to everyone'. In a nutshell, we have various options for what fields to import, and handy buttons to select 'all media' or 'all internet' - and as Original Title can now be both it's not very logical. Not everyone uses the Internet lookup function, so it has to remain optional.

    For original title I've added a drop-down box with four options - 'File Name', 'Folder Name', 'File Name + Internet Lookup' and 'Folder name + Internet Lookup'. This should cater for everyone I think!

    I spent a fair bit of time on this yesterday and it's getting there. Like I said - it requires some significant internal changes, plus I'm having to use datagrids for the lists of 'filter strings' and I haven't done those in winforms apps before, and it's pretty different to the ASP.Net one.

    I should have a beta version ready for testing in the next day or so - I'll let you know.

    Cheers,

    Orion.
     

    z3us

    Portal Pro
    December 4, 2007
    1,047
    123
    46
    Home Country
    Spain Spain
    Orion, Im getting this error all times, after processing new files:
    Code:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.ComponentModel.Win32Exception: El sistema no puede hallar el archivo especificado
       at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start()
       at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start(String fileName)
       at AMCUpdater.AntProcessor.UpdateXMLFile_PostProcessing()
       at AMCUpdater.AntProcessor.bgwFolderScanUpdate_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
       at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    AMCUpdater
        Assembly Version: 0.7.3.1
        Win32 Version: 0.7.3.1
        CodeBase: file:///C:/ANT/AMC2/AMCUpdater.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Management
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
    ----------------------------------------
    grabber
        Assembly Version: 0.0.0.0
        Win32 Version: 0.0.0.0
        CodeBase: file:///C:/ANT/AMC2/grabber.DLL
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.



    Anyway, the files are correctly added to the DB
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    Hi All,

    Attached is a copy of the latest code. It's just the exe, so needs the rest of the files from your current copy. Please feel free to have a play, particularly with regards to the latest requests for movie name handling and file / folder exclusions. You'll get some alerts logged the first time you run - there's some new settings which won't be in your config file from the previous version. It'll use defaults in this case.

    Please look through the options carefully the first time you run it - the changes should be obvious. The file and folder exclusions are currently straight string comparisons (case insensitive), and they ignore the file extensions. The string replacements comparison supports RegEx expressions as well as straight text string replacements (i.e. 'DVDRip' or 'H264' etc.)

    This copy is definitely not what I'd call 'ready for release' - so bear in mind there will be bugs. Please let me know if you find any!

    Here's the current changelog for version 0.7.4:

    Changes:
    • Check status of buttons on manual run, particularly on error. Fixed.
    • Fix handling of file errors during multi-threaded manual update. Fixed.
    • Improved support for Settings files – properly handles new settings if not found in old user settings file. Done.
    • Fix handling of CHECKED flag for main import run (and manual I suppose). Fixed.
    • Option to change how movie title (original title) is imported: File Name, Parent Folder Name, or each with Internet Lookup. Done.
    • Import scanning – does not remove ‘1of2’ type entries when sending through to Internet grabber. Fixed.
    • Automatically ‘cleanse’ filename, regardless whether gathered from filename or foldername. Done.
    • Exclusion keywords for Filenames and Foldernames when scanning. Done – needs thorough testing!
    • Enhance filename cleansing with RegEx support. Done – needs testing.
    • Add better indication of when Internet lookup will be needed (highlight Database Field options etc.). Done.

    Bugs / Outstanding:
    • Bug when running twice – first run imports multi-part files, second run reports no orphans but still says ‘2 multipart files blah’.
    • Batch mode glitch – returns control and appears to have finished whilst still running in the background.
    • Option to save / discard processed data for manual run
    • Import progress bar not properly recognising multi-part file imports

    Z3us - I can't really tell much from the .Net error details I'm afraid! All I see there is 'file not found' which could be anything. If it still happens with the new version then let me know what causes it, when, and what the log says! The only files which the app uses are its own program files, the Internet script file, the Excluded Movies file, your Ant catalog, and of course the files it scans. Unfortunately it could be any of these causing your problem!

    Cheers,

    Orion.
     

    jamieo

    Portal Member
    June 30, 2007
    20
    0
    Home Country
    England England
    Hi,

    Just tried the update, the first couple of runs produced only bare xml, no entries - I think that was because 'Original Title' is left unselected even after selecting both all media and all internet buttons. Once I checked 'Original Title' it produced the results I expected. :)

    Ignoring folders based on hidden flag or keyword also works as expected - nice job!

    There's some general weirdness with the interaction between the comboboxes, checkboxes and 'Requires Internet Lookup' text on the field page being inconsistent - I'm not sure what the intended behaviour is with those but I imagine they are all just gui changes that are yet to be taken care of... For instance, changing the title combo results in all combos being disabled until restart. Choosing any internet field disables the title combo - I thought it might be to enforce internet lookup (but then I cannot choose the other lookup option) but some time later I found I could select the other title options and it worked regardless. Reverting the changes above does not re-enable the controls without a restart.

    When internet lookup is run for the trilogy case it cannot find 'Bourne Trilogy' so I select 'Ignore' but of course, it continues to prompt me per file despite the title being taken from the folder. It would be nice if it ignored each duplicate case else this could get really annoying with six star wars titles, Mission Impossible and other trilogies... Also, if I want to manually search I do not know what title to put as the filename is not shown anywhere. Additionaaly, it would be nice (but not essential) if it would retain the folder name as a group indicator, as mentioned before, so it's possible to do this all in your program.

    edit: Also, could the window startup position of the internet search dialog be changed to centre of parent? On each subsequent opening it's in a different position (windows default 'cascade') which means I have to chase it across my screen! ;)

    Apart from the above GUI issues the results are exactly as required. Thanks for the update, I can at last use your program to get my films imported!

    Jamie
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    Just tried the update, the first couple of runs produced only bare xml, no entries - I think that was because 'Original Title' is left unselected even after selecting both all media and all internet buttons. Once I checked 'Original Title' it produced the results I expected. :)
    Yup - like I said, Original Title is now both Media and Internet based, and I found it confusing having that option selected / deselected by both the 'all media' and 'all Internet' functions. So it's now on by default (because everyone wants it imported on a scan!) and only included in the 'all fields' group. I briefly considered making it mandatory, however it needs to be optional for Manual Update runs and they share this configuration tab.

    There's some general weirdness with the interaction between the comboboxes, checkboxes and 'Requires Internet Lookup' text on the field page being inconsistent - I'm not sure what the intended behaviour is with those but I imagine they are all just gui changes that are yet to be taken care of... For instance, changing the title combo results in all combos being disabled until restart. Choosing any internet field disables the title combo - I thought it might be to enforce internet lookup (but then I cannot choose the other lookup option) but some time later I found I could select the other title options and it worked regardless. Reverting the changes above does not re-enable the controls without a restart.
    Hmm - that's odd. Works fine for me. I've set it up to be a bit more intuitive (I thought!) so that if you deselect the Original Title, then the Title Handling combo is disabled. Likewise for the Checked option dropdown and the Date field dropdown - they should only be available if the relevant entry is ticked in the list. The 'Internet Lookup Required' prompt should be visible if any of the Internet fields are selected, or if Original Title Handling is set to perform Internet lookup. Hopefully that all makes sense - please have another play and let me know if it's not doing that for you!

    When internet lookup is run for the trilogy case it cannot find 'Bourne Trilogy' so I select 'Ignore' but of course, it continues to prompt me per file despite the title being taken from the folder. It would be nice if it ignored each duplicate case else this could get really annoying with six star wars titles, Mission Impossible and other trilogies... Also, if I want to manually search I do not know what title to put as the filename is not shown anywhere. Additionaaly, it would be nice (but not essential) if it would retain the folder name as a group indicator, as mentioned before, so it's possible to do this all in your program.
    I've set up a folder structure to match yours for the Bourne example for testing. I've now set the title of the Internet Lookup window to show you the folder and filename - that should help with doing a correct lookup for these options.

    Detecting the duplicate entries however is very difficult - at the point of Internet lookup it loops through the list and does the lookup for each file, but it wouldn't notice a duplicate 'Bourne Trilogy, the' entry until it gets to the second bourne film! I'll see if there's any easy way to work that out in advance but I'm not hugely hopeful. Do bear in mind that even if you have to manually correct some entries, it's still a one-off chore to do!

    edit: Also, could the window startup position of the internet search dialog be changed to centre of parent? On each subsequent opening it's in a different position (windows default 'cascade') which means I have to chase it across my screen! ;)
    Now fixed.

    Cheers,

    Orion.
     

    Users who are viewing this thread

    Top Bottom