App to Copy Artwork and Details to Movie Folder v0.5.6 (2 Viewers)

jmcentire

Portal Pro
November 7, 2008
85
136
Home Country
United States of America United States of America
Re: App to Copy Artwork and Details to Movie Folder

I am also adding an option to rename existing directories instead of creating new ones, so those of us who already have our movies in individual dirs can use this to get our directory names in order.

That's cool.

You have to decide what to do about foreign movies

eg. Das Leben der Anderen (2006)

Title = Das Leben der Anderen
AKA = The Lives of Others (UK) (USA)

So options are;

\Das Leben der Anderen (2006)\
or \The Lives of Others (2006)\
or \The Lives of Others [Das Leben der Anderen] (2006)\

I prefer to have the English title in the directory structure, This doesn't work as well for parsing, however since your app is working with movies that are already in the database then this doesn't matter. Also since we have method for adding the .nfo file this doesn't matter either.

I am only using the Title field in the Moving Pics database, all alternate titles are stored in a separate field. So You would have to change to title in Moving Pictures to the one you want(which you can do in the moving pictures config).
 

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Re: App to Copy Artwork and Details to Movie Folder

    What about the following complicated situations. These are just ideas I had that might crash your application. So thought I'd share them, just in case any of the situations havn't been covered.


    Some of your movies are in seperate folders and some arn't
    eg.

    \Movies\Batman-Klaxxon\Batman.avi
    \Movies\The Matrix.720RIP.Klaxxon\The Matrix.avi
    \Movies\Alien 3.avi
    \Movies\Aeon Flux.avi

    (or)

    You have two part movie inside root folder
    eg.

    \Movies\The Matrix CD1.avi
    \Movies\The Matrix CD2.avi

    You have two part movie inside their own directory
    eg.

    \Movies\The.Matrix.Xvid\The Matrix CD1.avi
    \Movies\The.Matrix.Xvid\The Matrix CD2.avi

    (or)

    You have two copies of the same movie in root folder
    eg.

    \Movies\The Matrix.avi
    \Movies\The Matrix - Directors Cut.avi
    \Movies\Aeon Flux.avi

    (or)

    You have two copies of the same movie in their own folder
    eg.

    \Movies\The.Matrix.Rips\The Matrix.avi
    \Movies\The.Matrix.Rips\The Matrix - Directors Cut.avi

    (or)

    You have two copies of the same movie in seperate folders
    eg.

    \Movies\The.Matrix\The Matrix.avi
    \Movies\The.Matrix.720p.Directors.Cut\The Matrix - Directors Cut.avi
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    Re: App to Copy Artwork and Details to Movie Folder

    What about the following complicated situations. These are just ideas I had that might crash your application. So thought I'd share them, just in case any of the situations havn't been covered.

    Good questions, I had thought of most of them, and they way I designed it to run should prevent any major problems, you may run into some that either don't get moved/renamed in which case those movies will not updated in the database, OR a file may be moved and the database didn't update it, in that case it should only be a couple, a quick reimport for those movies will get ya back.

    You have two part movie inside root folder
    eg.

    \Movies\The Matrix CD1.avi
    \Movies\The Matrix CD2.avi

    It will move both movies into the same directory as long as they are tied to the same Title in Moving Pictures.

    You have two part movie inside their own directory
    eg.

    \Movies\The.Matrix.Xvid\The Matrix CD1.avi
    \Movies\The.Matrix.Xvid\The Matrix CD2.avi

    When the script encounters "Matrix CD1.avi" from the database it will rename the folder, when it encounters "Matrix CD2.avi" from the database it sees that "Matrix CD2.avi" doesn't exist(in the old location), so it does nothing. When the script goes to update the database it checks where the files should be according to the new naming and updates the database based on if the file exists in the new location. So as long as they are tied to the same "Title" in Moving Pictures everything will update correctly.

    You have two copies of the same movie in root folder
    eg.

    \Movies\The Matrix.avi
    \Movies\The Matrix - Directors Cut.avi
    \Movies\Aeon Flux.avi

    If they have the same Title in Moving Pictures, they will end up in the same folder.

    You have two copies of the same movie in their own folder
    eg.

    \Movies\The.Matrix.Rips\The Matrix.avi
    \Movies\The.Matrix.Rips\The Matrix - Directors Cut.avi

    Both movies will end up in the folder of the first movie(in that folder) that it encountered. If they have the same title in moving pictures it will update the database correctly. However if they have different titles the second movie will not be updated in the database. You would have to run an import in moving pictures to update it.

    You have two copies of the same movie in seperate folders
    eg.

    \Movies\The.Matrix\The Matrix.avi
    \Movies\The.Matrix.720p.Directors.Cut\The Matrix - Directors Cut.avi

    In this case the app wouldn't be able to rename the second one it encounters(since that directory already exists), so it will leave it as is. In that case you would have to manually rename or move the second one.

    (Some of your movies are in seperate folders and some arn't
    eg.

    \Movies\Batman-Klaxxon\Batman.avi
    \Movies\The Matrix.720RIP.Klaxxon\The Matrix.avi
    \Movies\Alien 3.avi
    \Movies\Aeon Flux.avi

    Not sure how I could make the app handle this...

    I think the easiest way to get around this would probably be:

    1. Move the movies(and their folders) that are in individual folders to a location that is not monitored by moving pictures.
    2. Run moving pictures import so it notices those files are gone and removes them from the database.
    3. Run the script to get all the other movies into individual folders.
    4. Move the first set of movies back.
    5. Run moving pictures import again to get the first set of movies back in the DB
    6. Run the script again to get all your folder names to match.

    I'm not positive on this, but I believe the DB keeps the movie data when you delete a movie, so the reimport shouldn't take too long.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Re: App to Copy Artwork and Details to Movie Folder

    Thanks for that. You missed one, probably because i edited my post multiple times.

    You have two part movie inside their own directory
    eg.

    \Movies\The.Matrix.Xvid\The Matrix CD1.avi
    \Movies\The.Matrix.Xvid\The Matrix CD2.avi
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    Re: App to Copy Artwork and Details to Movie Folder

    Thanks for that. You missed one, probably because i edited my post multiple times.

    You have two part movie inside their own directory
    eg.

    \Movies\The.Matrix.Xvid\The Matrix CD1.avi
    \Movies\The.Matrix.Xvid\The Matrix CD2.avi

    I was editing my post as well....it should be there.
     

    dongadomski

    Portal Member
    November 29, 2009
    6
    0
    Re: App to Copy Artwork and Details to Movie Folder

    Hi all,

    a big "Thank You" to jmcentire for solving the issue with the special characters. It really cost me some nerves trying to solve it in autohotkey - I would have grown a white beard trying without success. :oops:

    Now that this works, I encountered another issue when trying to reread my DVD collection on my 2nd MP client.

    My DVDs are sorted in Folders

    MovieTitle\VIDEO_TS\files

    and the script copies the nfo-files and cover art inside the VIDEO_TS folder. However, Moving pictures seams to expect the nfos in the MovieTitle-folder. Is this correct?

    If so, would it be possible to extract the VIDEO_TS from the filename and copy cover art and nfo-files in the MovieTitle folder?
    After my fabulous results trying the special character problem, I am hesitant to try again with the folder names.:confused:

    Thanks in advance
    DonGadomski
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    Re: App to Copy Artwork and Details to Movie Folder

    That shouldn't be too hard, when I update the script to use the xbmc format nfo, I'll add that.
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    Re: App to Copy Artwork and Details to Movie Folder

    New version 0.4 - Updated first post.

    NFO file is now in the XBMC format.

    Detects if your movie file is in a VIDEO_TS folder, if so it will put the artwork and nfo file in the VIDEO_TS's parent directory.
     

    Users who are viewing this thread

    Top Bottom