Preserve Movie Information while moving files (1 Viewer)

Terra

Portal Pro
August 25, 2009
230
57
Home Country
Austria Austria
Hi!

I have a rather large library of movies spread across several hard disks. I want to order some of my files and move them around, put them in different folders etc. e.g. move some movies from harddisk A to harddisk B and so on.

The problem I'm having is that when I move the files Moving Pictures will start the import process again and will erase all my changes that I made to e.g. Movie Title, Sorting Order Name, etc...

Is there a way to preserve that information so that Moving Pictures remembers them even if I move the files around? I know that I can export the imdbId, coverart and background but is there a way to preserve the meta information?
 

Imzadi

MP Donator
  • Premium Supporter
  • June 18, 2008
    250
    67
    Aachen
    Home Country
    Germany Germany
    Moving Pictures doesn't change the movie information if the file location changes. I only move files, while moving pictures is not running. When I start moving pictures it updates file location and everything else is unchanged, and without re-import.
     

    Terra

    Portal Pro
    August 25, 2009
    230
    57
    Home Country
    Austria Austria
    That's interesting.
    Does Moving Pictures remember the file name or the movie folder name or both?
    Does this feature work with filenames or file hashes?

    I assume it did not work for my test files I moved because I also changed the names a bit e.g. adding the year of the movie in the filename.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    MovPic generates a hash on your files, its based on the content.

    So if you rename your files, or move them to another active import path, the movie reference in database is simply updated to the new name/location.

    However if you 'move' the file too slow without a file-lock, then MovPic kicks in a delete first and then re-adds it.

    For example if I move a file from \\UNC-Path\Movies\Some.Movie.avi to D:\Movies on the HTPC then even with MovPic running the path gets updated. If I move it from D:\Movies\Action\Some.Movie.avi to D:\Movies\Thriller it instantly gets updated as well. But if I move it from my D: drive to E: drive then sometimes it gets deleted first and then re-added because the D: drive is much faster then the E: drive and causes lock issues I guess (or whatever is the real reason).

    The best way to prevent it is to simply close down MePo/MovPic and move all the files first (and rename) and then launch MovPic. It will take a few seconds to mass-update everything (I've just recently moved about 350 movies over and it took about 4 secs to update, most of the time was lost creating all the log entries).

    An easy way to see this inside MovPic config is to open the first tab and look at the 'red' colored list entries. This reflects a path update has been done, and if you close it and re-open they will show their normal 'black' color. An even more detailed way would be to analyze the log file, I do this via batch scripts myself, such as:

    Code:
    @Echo Off
    IF EXIST "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log" find " was renamed to " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log"
    IF EXIST "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log" find " was moved/renamed to " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log"
    find " was renamed to " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.log"
    find " was moved/renamed to " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.log"
    echo.
    pause

    Another script I use to verify what movies got added and which movies failed to auto-approve is:

    Code:
    @Echo Off
    IF EXIST "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log" find "Removing: " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log"
    IF EXIST "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log" find "Added """ "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log"
    IF EXIST "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log" find "MovieImporter]: No exact match for " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.old.log"
    find "Removing: " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.log"
    find "Added """ "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.log"
    find "MovieImporter]: No exact match for " "C:\ProgramData\Team MediaPortal\MediaPortal\log\movingpictures.log"
    echo.
    pause

    I didn't bother prettying up the output, but it is definatly useful for me in a concurrent user environment with MediaPortal sometimes in use with MP-TVSeries when I want to find out what MovPic did via RDP. The above scripts let me do just that.
     
    Last edited:

    glenb83

    Portal Pro
    April 24, 2009
    121
    7
    Home Country
    Hi guys, found this thread when I was having a similar problem. Basically, I store all my media on a server, and I have just had to rebuild the server. I had 3 import paths for moving pictures setup previously:

    \\Server\windows\videos\movies, \\Server\windows\videos\concerts, \\Server\windows\videos\kids

    The new locations are similar, but slightly different:

    \\Server\media\videos\movies, \\Server\media\videos\concerts, \\Server\media\videos\kids

    What happens is I open MovingPictures config from the plugins menu, and it lists my original 3 import paths and all movies are listed in red in the movies tab. As soon as I try to add 1 of the new paths, it instantly tries to import all the data again. I then close the importer and copy the original database file back. I have done alot of customising the imported movies that weren't recognised automatically and I don't want to have to do it all again!

    Is there another way I can edit a file or setting somewhere and globally change the import paths, or some other way to do it so MP doesn't try to re-import everything? In tv-series I added the new path alongside the first, did a reimport and then deleted the original share and it all seemed ok.

    Thanks in advance!
     

    StarWup

    Portal Pro
    April 7, 2011
    113
    5
    Home Country
    Germany Germany
    Whatever the folders are named on the server, the share name may be different. So if you look at the servers local configuration and the folders are for example D:\storage\media\videos\.. you may share each folder as what ever you like them to be named. If you go to the parent folder called "media" just share him as "windows".
    From the client side of view the share on the server after that would be \\server\windows\videos\.. just like before the migration. If you have shared the folder already as "media" you can remove that name to avoid cunfusions (depends on the server operating system; some allow multiple shares for the same folder). Additionally, adjust the access rights for the share and for the file system so that the client can read and write to the folder. You may test that with creating and deleting a simple text file in that folder from the client over your network.
     
    Last edited:

    glenb83

    Portal Pro
    April 24, 2009
    121
    7
    Home Country
    Whatever the folders are named on the server, the share name may be different. So if you look at the servers local configuration and the folders are for example D:\storage\media\videos\.. you may share each folder as what ever you like them to be named. If you go to the parent folder called "media" just share him as "windows".
    From the client side of view the share on the server after that would be \\server\windows\videos\.. just like before the migration. If you have shared the folder already as "media" you can remove that name to avoid cunfusions (depends on the server operating system; some allow multiple shares for the same folder). Additionally, adjust the access rights for the share and for the file system so that the client can read and write to the folder. You may test that with creating and deleting a simple text file in that folder from the client over your network.

    Thanks for the speedy reply!

    Problem is it's not a 'server' exactly, rather an advanced NAS. Im using the NAS4Free software and setup the dataset mounting points that way as opposed to the old windows reference.

    If there is a way to adjust the mediaportal config somehow to replace the old paths with new I would much rather, but if it is just not possible I would probably prefer to just spend the time reimporting everything than changing my dataset names, I created them this way on the new server for easier access/control.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    If there is a way to adjust the mediaportal config somehow to replace the old paths with new I would much rather, but if it is just not possible I would probably prefer to just spend the time reimporting everything than changing my dataset names, I created them this way on the new server for easier access/control.

    MovPic will do this automatic, as I explained in detail in a post above.

    In short.

    1. Leave old files the way they are​
    2. Create new path location on new server/etc​
    3. Add path to MovPic config, so it becomes a valid new import path alongside old one​
    4. Shut down MePo/MovPic​
    5. Move all your files over from old path to new one (not copy)​
    6. Launch MovPic config and sit back for a while. The path update will go fast, but with enough movies or a slow hash calculation it will still take a bit.​
    7. Movies will show as 'red' inside Movie Details tab, restart MovPic and confirm that all your movies are 'black' again, and then (and only then) remove old import path​
     

    glenb83

    Portal Pro
    April 24, 2009
    121
    7
    Home Country
    If there is a way to adjust the mediaportal config somehow to replace the old paths with new I would much rather, but if it is just not possible I would probably prefer to just spend the time reimporting everything than changing my dataset names, I created them this way on the new server for easier access/control.

    MovPic will do this automatic, as I explained in detail in a post above.

    In short.

    1. Leave old files the way they are​
    2. Create new path location on new server/etc​
    3. Add path to MovPic config, so it becomes a valid new import path alongside old one​
    4. Shut down MePo/MovPic​
    5. Move all your files over from old path to new one (not copy)​
    6. Launch MovPic config and sit back for a while. The path update will go fast, but with enough movies or a slow hash calculation it will still take a bit.​
    7. Movies will show as 'red' inside Movie Details tab, restart MovPic and confirm that all your movies are 'black' again, and then (and only then) remove old import path​

    Thanks for clearing that up, seems my problem is that the old location no longer exists as it was on the same server hardware but previous install, so the old files are no longer there and adding new locations automatically triggers an import. I'll just have to go through the import process again and not change the location again!

    Thanks anyway
     

    Users who are viewing this thread

    Top Bottom