Automatically updating AMC database when new files are added... (1 Viewer)

mcbelly

MP Donator
  • Premium Supporter
  • June 29, 2006
    190
    5
    Home Country
    Germany Germany
    Ahh...problem found. I ran it from a network share, but it has to be on the local computer.

    Thanks for your help !

    Hi - me again.

    Works like a charm now, and here are the first feature requests ! (yeah, I know.... :) )

    1. Recursive seach, including subfolders (or have I overseen sth.?)
    2. Have multiple input paths. I have my movies on two shares and esp. for the "autoupdate" part, this would be great.

    Thanks for your effort, this really makes myFilms worth it!!!!!

    mcbelly
     

    Tirade

    Portal Member
    January 22, 2008
    38
    1
    My only concern is that you say you'll switch all your files to .mp4 format, in which case you'll still need to go through your catalog and specify the .mp4 filename in each Ant entry won't you? I know MyFilms will find the DVD files in a folder but if the folder only contains one .mp4 file, will MyFilms pick that up and play it? I would guess not, though I haven't tried it.

    Cheers,

    OrionHall.

    Yes, it will work fine with a path leading to a single MP4 file. Well it does for me :0

    I do have .mp4 listed as one of my movies type files in MP which is what I believe MyFilms checks. It sees the path and scans the folder for any .??? file type that you have listed as a movie file type in MP. Thats why everything must be in its own folder.
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    Ahh...problem found. I ran it from a network share, but it has to be on the local computer.

    Thanks for your help !

    Hi - me again.

    Works like a charm now, and here are the first feature requests ! (yeah, I know.... :) )

    1. Recursive seach, including subfolders (or have I overseen sth.?)
    2. Have multiple input paths. I have my movies on two shares and esp. for the "autoupdate" part, this would be great.

    Thanks for your effort, this really makes myFilms worth it!!!!!

    mcbelly

    Excellent - glad to hear it's working for you.

    Recursive search - this should happen automatically. Please have a play, and if you find it's not working then please post the kind of files / folder structure that it's struggling with. Make sure the file types you're scanning for are listed on the Options page.

    Multiple input paths - yeah, I've been thinking some people may need that. My movies are all in one folder, so I don't have that problem :) It shouldn't be hard to implement that, though scanning multiple paths means the 'override path' makes no sense. I guess it's either/or - scan one folder with the option to tweak the path, or multiple paths 'as-is'. I'll add that to the list for the next release. I'm quite happy to add this kind of thing if it's needed - mainly because I've found MediaPortal and all it's plugins to be excellent - and free - so it's nice to give something back.

    Yes, it will work fine with a path leading to a single MP4 file. Well it does for me :0

    I do have .mp4 listed as one of my movies type files in MP which is what I believe MyFilms checks. It sees the path and scans the folder for any .??? file type that you have listed as a movie file type in MP. Thats why everything must be in its own folder.

    Ah - well you learn something new every day! In that case then yeah, you'll be able to move from DVD copies to mp4 files without changing a thing. Nice. I have my films in one big folder, and Ant lists the full UNC path to each in the Source field, and that's what MyFilms uses to locate them. I don't use MyFilm's searching ability at all.

    I do understand the reasoning for storing folder paths only and not storing the filenames, so will see if that can be added without breaking anything!

    Cheers,

    OrionHall.

    p.s. Note to mcbelly... I forgot to mention that I tested running my app over a UNC path and got the same error as you. No idea why - I thought a simple .Net app would be fine with this. Probably something simple so I'll look into it (i.e. ask one of my colleagues, all of whom are professional coders!)
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    49
    Home Country
    Sweden Sweden
    Is there a way to update the ant database every time you add movies in the folder automatic or is it supposed to be used with scheduling and or autostart?

    Nope - sorry - it's designed for occasional use via the GUI, or scheduled use via batch mode only.

    I've got my app running on startup on my media PC, and that works well enough for me. It occurred to me that it may also be possible to configure MediaPortal so you can launch my app directly from there, or possibly just assign a remote control button to the job. But I've never considered having this run 24x7 and monitor the folders for changes. For a start, my media PC has no local media files, so would have to constantly monitor the movie folders over the LAN. Plus it's normally off during the day so no updates are possible anyway!

    Well automonitoring would be a really cool feature. I am running my computer 24/7 where i store my movies. If I could get it to automatically add movies to the ant database by just moving the file to the movie map would be great.
    Something you might want to consider? Maybe not useful since I anyway have to runt ant manually for updates.

    I have however a problem. When running from CLI I can not get the "purge database entries" to work. Works perfectly when run from gui. I can attach some logfiles if you need.
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    Well automonitoring would be a really cool feature. I am running my computer 24/7 where i store my movies. If I could get it to automatically add movies to the ant database by just moving the file to the movie map would be great.
    Something you might want to consider? Maybe not useful since I anyway have to runt ant manually for updates.

    I have however a problem. When running from CLI I can not get the "purge database entries" to work. Works perfectly when run from gui. I can attach some logfiles if you need.

    Yeah, I see your point. I don't think it's something I'll be adding soon though, as it's not the kind of thing I've ever written. I also imagine people would then want it to run as a service rather than as a desktop application, and that's even more alien to me (from a coding point of view). Maybe at some point!

    In the meantime, if you want to ensure your Ant catalog is up to date each time you run it, you could run AMCUpdater with command line parameters and have it auto-run Ant after it finishes. You'll need to run the GUI first to set the auto-run options, and then it'll happen from batch mode too. Maybe better than nothing though.

    On the purge option - I'll have a look and see if I can replicate the problem. I haven't fully tested that bit for a while, but since the only recent change to the purge code was to re-enable it from the command line I figured it would be fine. Evidently not! Logs would help - if you're concerned about security / privacy then feel free to e-mail to my SourceForge account - OrionHall (at) users (dot) sourceforge (dot) net, or just post the relevant bits here (everything apart from the actual filenames, really).

    Cheers,

    OrionHall.
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    49
    Home Country
    Sweden Sweden
    A suggestion to the purge option.
    I am thinking about adding also movies that I have on DVD as well as adding movies on HDD.
    The problem is then if I use the purge option is that movies that I actually have on DVD will be purged.

    Could it be possible to have an option to only purge database items that have HDD as mediatype and keep for example mediatype DVD even if the file is not present?
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    49
    Home Country
    Sweden Sweden
    On the purge option - I'll have a look and see if I can replicate the problem. I haven't fully tested that bit for a while, but since the only recent change to the purge code was to re-enable it from the command line I figured it would be fine. Evidently not! Logs would help - if you're concerned about security / privacy then feel free to e-mail to my SourceForge account - OrionHall (at) users (dot) sourceforge (dot) net, or just post the relevant bits here (everything apart from the actual filenames, really).

    Cheers,

    OrionHall.

    I have attached two logfiles. One from console mode. The logfile says the purge option is true but it does not remove the movie from the database. When I after that run from GUI it imediately removes the move from database which you can see from the logfile.

    Is it by the way possible to get the save settings store the purge option?
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    A suggestion to the purge option.
    I am thinking about adding also movies that I have on DVD as well as adding movies on HDD.
    The problem is then if I use the purge option is that movies that I actually have on DVD will be purged.

    Could it be possible to have an option to only purge database items that have HDD as mediatype and keep for example mediatype DVD even if the file is not present?

    Hi Johan,

    I think the way the purge option currently works should do what you need, just not in quite the same way. Doing it with the mediatype sounds good - and I did consider it originally, but it would then only be of use if you make the effort and have your whole collection properly labelled. Not a problem if you build it from scratch with that it mind, but possibly not a good prospect for someone who already has a full database. Instead, I've coded the purge option to work like this...

    If you are scanning "\\server\movies\", or you have that as your override path, then the purge option will remove only the database items which a) have a path like "\\server\movies\filename.avi" and b) are not found in the scanned location. So if in this case there is a database entry for "d:\some movie.avi" or "d:\video_ts\video_ts.ifo" will be ignored. On the other hand, if you were to scan d:\ or have that as override, then all entries with a path like "d:\anything" will be removed. But I figure this is a logical approach - I have old archived files on DVD in DivX format as well as my whole DVD collection listed in MyFilms, and no problems so far.

    I hope that all makes sense, and do let me know what you think of this technique!

    I have attached two logfiles. One from console mode. The logfile says the purge option is true but it does not remove the movie from the database. When I after that run from GUI it imediately removes the move from database which you can see from the logfile.

    Is it by the way possible to get the save settings store the purge option?

    Thanks for that - I'll look into the problem when I have time. Hopefully tomorrow or this weekend - I can't imagine it's a big problem, probably just missing a line to invoke the purge code from the command line. Saving the option to purge files is easy - I'll put it on the to-do list!

    Cheers,

    OrionHall.
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    49
    Home Country
    Sweden Sweden
    Hi Johan,

    I think the way the purge option currently works should do what you need, just not in quite the same way. Doing it with the mediatype sounds good - and I did consider it originally, but it would then only be of use if you make the effort and have your whole collection properly labelled. Not a problem if you build it from scratch with that it mind, but possibly not a good prospect for someone who already has a full database. Instead, I've coded the purge option to work like this...

    If you are scanning "\\server\movies\", or you have that as your override path, then the purge option will remove only the database items which a) have a path like "\\server\movies\filename.avi" and b) are not found in the scanned location. So if in this case there is a database entry for "d:\some movie.avi" or "d:\video_ts\video_ts.ifo" will be ignored. On the other hand, if you were to scan d:\ or have that as override, then all entries with a path like "d:\anything" will be removed. But I figure this is a logical approach - I have old archived files on DVD in DivX format as well as my whole DVD collection listed in MyFilms, and no problems so far.

    I hope that all makes sense, and do let me know what you think of this technique!

    Ah! You have allready thought of that. And this technique is even better! :)


    Thanks for that - I'll look into the problem when I have time. Hopefully tomorrow or this weekend - I can't imagine it's a big problem, probably just missing a line to invoke the purge code from the command line. Saving the option to purge files is easy - I'll put it on the to-do list!

    Cheers,

    OrionHall.

    Great! Thanks!
     

    OrionHall

    Portal Pro
    September 13, 2007
    198
    31
    London
    Home Country
    United Kingdom United Kingdom
    AMCUpdater 0.6.1 Bugfix Release

    Hi All,

    Just a minor release to fix a few bugs. Johan - you should find the purge option works properly now. Also I've found my logfiles get rather large since I run my app almost daily and it's scanning 500+ xml entries and 300+ physical files each time! I've added the option to filter the data which goes into the log (full data still shows on screen though). You can now have either a) full logging (as it was before), b) major events (just says what it does and doesn't list the individual files scanned), or c) errors only.

    The downloads are at the usual place - here

    As always, please let me know if there's any problems with this release.

    Cheers,

    OrionHall.
     

    Users who are viewing this thread

    Top Bottom