MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins » Hot Plugins » My Films


My Films MediaPortal My Films plugin.

Reply
 
Thread Tools Display Modes
Old 2008-08-17, 17:31   #21 (permalink)
 
Join Date: Sep 2007
Location: London
Posts: 178
Thanks: 1
Thanked 26 Times in 20 Posts

Country:

My System

Default

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.
OrionHall is offline   Reply With Quote
Old 2008-08-17, 18:47   #22 (permalink)
Portal Member
 
Join Date: Aug 2007
Posts: 191
Thanks: 1
Thanked 4 Times in 4 Posts

Country:

My System

Default

Excellent OrionHall

I'm ready to test when there's something to test. Many thanks!
seco is online now   Reply With Quote
Old 2008-08-17, 21:48   #23 (permalink)
Portal Member
 
z3us's Avatar
 
Join Date: Dec 2007
Posts: 275
Thanks: 51
Thanked 8 Times in 8 Posts

Country:


Default

Quote:
Originally Posted by OrionHall View Post
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.
z3us is offline   Reply With Quote
Old 2008-08-18, 11:13   #24 (permalink)
 
Join Date: Sep 2007
Location: London
Posts: 178
Thanks: 1
Thanked 26 Times in 20 Posts

Country:

My System

Default

Quote:
Originally Posted by z3us View Post
Quote:
Originally Posted by OrionHall View Post
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.
OrionHall is offline   Reply With Quote
Old 2008-08-18, 21:08   #25 (permalink)
Portal Member
 
Join Date: Jun 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Excellent, I look forward to the next release.

Quote:
Originally Posted by OrionHall View Post
... 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:
file = "M:\films\The Bourne Ultimatum\s-tbu.mkv"

fieldSource = file

if useFolderName then
  fieldTitle = GetParentFolderName(file)
else
  fieldTitle = GetFileTitle(file)

if getInternetData then IMDBLookup(fieldTitle) 
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
jamieo is offline   Reply With Quote
Old 2008-08-19, 08:35   #26 (permalink)
 
Join Date: Sep 2007
Location: London
Posts: 178
Thanks: 1
Thanked 26 Times in 20 Posts

Country:

My System

Default

Quote:
Originally Posted by jamieo View Post
Excellent, I look forward to the next release.

Quote:
Originally Posted by OrionHall View Post
... 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:
file = "M:\films\The Bourne Ultimatum\s-tbu.mkv"

fieldSource = file

if useFolderName then
  fieldTitle = GetParentFolderName(file)
else
  fieldTitle = GetFileTitle(file)

if getInternetData then IMDBLookup(fieldTitle) 
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

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.
OrionHall is offline   Reply With Quote
Old 2008-08-19, 09:01   #27 (permalink)
Portal Member
 
z3us's Avatar
 
Join Date: Dec 2007
Posts: 275
Thanks: 51
Thanked 8 Times in 8 Posts

Country:


Default

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
z3us is offline   Reply With Quote
Old 2008-08-19, 16:46   #28 (permalink)
 
Join Date: Sep 2007
Location: London
Posts: 178
Thanks: 1
Thanked 26 Times in 20 Posts

Country:

My System

Lightbulb

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.
Attached Files
File Type: zip AMCUpdater.zip (129.4 KB, 14 views)
OrionHall is offline   Reply With Quote
This User Say Thank You:
Old 2008-08-19, 22:37   #29 (permalink)
Portal Member
 
Join Date: Jun 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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

Last edited by jamieo; 2008-08-19 at 22:53.
jamieo is offline   Reply With Quote
Old 2008-08-20, 09:05   #30 (permalink)
 
Join Date: Sep 2007
Location: London
Posts: 178
Thanks: 1
Thanked 26 Times in 20 Posts

Country:

My System

Default

Quote:
Originally Posted by jamieo View Post
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.

Quote:
Originally Posted by jamieo View Post
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!

Quote:
Originally Posted by jamieo View Post
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!

Quote:
Originally Posted by jamieo View Post
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.
OrionHall is offline   Reply With Quote
Reply

Bookmarks

Tags
amc, updater

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
auto-updater! Eyep0p Improvement Suggestions 2 2007-10-29 14:43
Auto SVN updater SpudR Improvement Suggestions 3 2007-08-31 16:29
Updater and DShow filters diehard2 General Support 0 2006-09-07 19:30
Skinproblem with updater 0.2.0.2 olbo Skins 4 2006-07-28 10:22
FireDTV remote don't work after 0.2.0.2 updater Hell_Angel General Support 0 2006-07-25 12:58


All times are GMT +1. The time now is 20:13.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden