Replace Videofile of a Movie (1 Viewer)

xadox

Portal Pro
August 18, 2005
220
26
Home Country
Germany Germany
Is there a way to replace a movie in the db with a different file?

For example I have the Movie XYZ in the folder "Movies (SD)" there is XYZ.mkv.
Now I want to replace the Movie with a different Version in the folder "Movies (HD)".
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Is there a way to replace a movie in the db with a different file?

    For example I have the Movie XYZ in the folder "Movies (SD)" there is XYZ.mkv.
    Now I want to replace the Movie with a different Version in the folder "Movies (HD)".

    As long as the media file itself is the same, you can rename it and move it to another folder without any problems. MovingPictures will detect it is the same media file, based on a hash value it calculated during import and will retain all the existing information (details, covers, watched flag, etc), and will only update the file location.

    You can even move it across drives or other computers, as long as you move it into an active import folder that is already setup within MovingPictures. The best way is to move the file with MovingPictures *NOT* running if it might take a while for the file to move, because otherwise it might detect the delete first and remove the movie and then re-import it upon detection of the new location.

    Try it with the one movie first, and once you see it worked, you can mass-move the rest. I've transferred hundreds myself across systems and it has gone flawless everytime. You can locate all the entries in the log file via the following commands:

    Code:
    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"

    Enjoy.
     

    xadox

    Portal Pro
    August 18, 2005
    220
    26
    Home Country
    Germany Germany
    AW: Replace Videofile of a Movie

    Thx for the feedback.
    But the Videofile it self is not the same. I have many movies which I want to replace with a version with better resolution (SD -> HD).
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: AW: Replace Videofile of a Movie

    Thx for the feedback.
    But the Videofile it self is not the same. I have many movies which I want to replace with a version with better resolution (SD -> HD).

    Easiest way is to just import the HD version while you have MovingPictures configuration screen open, and then switch between importer and movie manager tabs to locate the movies in your collection. That way you will spot the seperate SD entry, which you can then use to duplicate the watched status flag from and after that you delete the media file itself. MovPic will detect the deletion almost immediatly and remove the SD entry.

    I mean you can mess around with dbase manipulation, but you still are going to have to do this on a file per file basis as each one will be unique. But then you still need to manually force a MediaInfo update, etc, etc. So fresh import is going to save you a lot of headaches.

    If you are importing fresh and deal with non-English titles, then this will also be perfect time to switch to IMDb+ Scraper :D
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    This is something I also wondered about.
    Up to now I also found reimporting the only way.
    But then I loose my original import date and watched status. No big deal, but still...

    I have my settings as "movie per folder". So I tried to put the new file in same folder. The importer then picks it up and link it to same DB entry. So far so good. Now my next step was in 1st tab (movie manager?) to select FILE button to show the 2 files. Then delete the old file. Then redo the mediainfo.
    But unfortunately as soon as I delete the original file the DB entry gets deleted even though I hoped the newer file should remain with rest of DB fields.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    This is something I also wondered about.
    Up to now I also found reimporting the only way.
    But then I loose my original import date and watched status. No big deal, but still...

    I have my settings as "movie per folder". So I tried to put the new file in same folder. The importer then picks it up and link it to same DB entry. So far so good. Now my next step was in 1st tab (movie manager?) to select FILE button to show the 2 files. Then delete the old file. Then redo the mediainfo.
    But unfortunately as soon as I delete the original file the DB entry gets deleted even though I hoped the newer file should remain with rest of DB fields.

    This is because of the hash value calculated on the original media file used to import.

    So if you open MovPic config, rename the SD file into the HD filename, this change will immediatly show on the 'Movie Manager' -> File Details view on the movie in question. Then import the HD file from a different folder, close MovPic config. Open DB3 database with an SQLite tool, locate HD file entry, lookup calculated hash value, swap that with the SD entry. Then overwrite the SD file with the HD file and launch MovPic config again. The old HD import should be removed and the SD entry should now remain with the HD file, then you refresh mediainfo and done.

    If you ask me, re-import is much easier :D
     

    Users who are viewing this thread

    Top Bottom