Moving to Central Database - Getting Duplicates (1 Viewer)

PureLoneWolf

Portal Pro
September 16, 2006
61
3
Home Country
Germany Germany
Hi all

Due to wanting to add new MP clients around my house, I decided to go for a central database so that my watched status in Moving Pictures and MP TV Series are in sync wherever I choose to watch.

As the MP database was already populated with a lot of media, split across a lot of locations...I edited the database to reference UNC shares as opposed to mapped drives. This all seemed to work fine, until I went into the Moving Pictures Configuration.

In the Moving Pictures Configuration...all of the films are listed in the Movie Manager correctly (with the correct paths) and the Movie Importer lists the correct UNC paths (and nothing else). However, the Movie Importer sees every file as being new. Leading to duplicates of every film being created.

I presume that I missed something in the database, but can't see what.

At the moment I am doing this on a test database...but would like to do it to the live database. I really don't want to have to wipe the films and rescan completely.

Many thanks
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I edited the database to reference UNC shares as opposed to mapped drives.

    Should have just let MovPic deal with that. You leave existing situation alone. Then you create a new import path based on UNC to a new location. Then you close MovPic, and move all the files over. Then you launch MovPic back up. It will notice the new movies on new location, but when it calculates the SHA1 hash it will notice it matches the movie it already had in database, so seeing as it also notices that movie is no longer available on the old import path, it will update just the path and retain date imported, watched flag and all the other info.

    You can recognize the files this is happening to by their red color inside the "Movie Manager" list and you can use "File Info" to verify the path updated.

    It's also possible to make a folder switch directly in config, since I'm sure your current UNC path setup points to the same location, however I personally kept running into issues on older versions of MovPic (it's most likely fixed now in current version, I just never tested it again). Just use the drop down options on the import paths to activate that method.
     

    PureLoneWolf

    Portal Pro
    September 16, 2006
    61
    3
    Home Country
    Germany Germany
    Thanks, but I am a little confused as to what you mean.

    I have a server with multiple drives that the HTPC is currently mapping drives 8 to:

    F: = \\server\F
    G: = \\server\G
    etc

    I changed it to remove the mapping and use the \\server\drive UNC instead. There are no files to move.

    I just noticed the "Toggle Replaced" function...that seemed to stop MovPic seeing everything as new...although it had already created some duplicates by the time I managed to set all the paths to replaced.

    I will now delete the duplicates and see what happens...

    Cheers

    ***********EDIT***************
    OK...I am going to try again.

    What is the process, using the MovPic gui?

    Remove F:\ source
    Add \\server\F
    Mark \\server\F as Replaced

    Or do I need to perform these things in a different order?

    Many thanks
     

    PureLoneWolf

    Portal Pro
    September 16, 2006
    61
    3
    Home Country
    Germany Germany
    Just to confirm

    This doesn't work (for me at least)

    Here is what I did:

    Load Moving Pictures Config
    Add \\server\drive\folder watched folder
    Close Moving Pictures Config
    Disconnect network drive
    Load Moving Pictures Config
    Go to Movie Manager (Films are marked as red) and wait

    After a while...new films are added whilst the Red films stay Red

    Fortunately, I found the renaming tool...so I think that an import will be a lot quicker than previously...I will just need to set the watched flag again.

    Thanks
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Go to Movie Manager (Films are marked as red) and wait

    Movies that get updated on their database path entry will remain 'red', until you close MovPic config and re-open it again. You can use the file-info drop down option to see if they got changed correctly, but their list will remain red.

    This is because that list is only loaded once on initial load (this is a known enhancement request to fix this for renaming movies)
     

    PureLoneWolf

    Portal Pro
    September 16, 2006
    61
    3
    Home Country
    Germany Germany
    Ah, I missed that bit...I should have thought to do that lol...

    I reimported in the end...thanks to the renamer tool, it didn't take very long at all.

    That said, I will give this a go again...just to confirm :)
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    Even though you already solved the issue i would like to explain the functionality behind "Toggle Replaced" as it might be confusing at first.
    I thought i had put up a broader description on the wiki but i can't verify that right now so here it goes:

    if you mark an import path with "Toggle Replaced" you are actually saying that the import path is "not being used" and you are replacing it.
    What this changes in the import process is that if it finds files/movies on other import paths that match files/movies from the "replaced" path (hash signature wise),
    it will register the new import path with the existing data.

    Why such a setting? Normally moving pictures tries to verify the existance of the file first on the old path so it can account for the move. In some situations this isn't possible and by marking the path as replaced you tell moving pictures that when any movie located on that path is found somewhere else it should be moved over.

    Once all movies/files are removed from the old import path this path will be automatically cleaned up (and removed from the system)
     

    rekenaar

    Retired Team Member
  • Premium Supporter
  • December 17, 2006
    4,421
    805
    Home Country
    South Africa South Africa
    That sounds great armandp.
    But I cannot seem to find the "toggle replaced" functionality in Config though. Sure I am just missing the obvious - sorry.
    (I can see to column in the import table)
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    it's in the submenu of the Remove Import Path button (hover over the minus sign, and click the black little triangle)
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    it's in the submenu of the Remove Import Path button (hover over the minus sign, and click the black little triangle)

    Perhaps it would help to eleborate on more actual usage scenarios.

    Because personally I'm aware of the setting, but have always ignored it, as it never seemed to work out well with race conditions for me. My mistake back then was probably to add the new import path with all the old-path movies in it before toggling that replace setting, as it would make sense to me to do that step first. But the subsequent warning you get when you actually use the option could scare some users into thinking they might then loose their existing collection.

    So what I still do myself is create empty folder and add it as new import folder in MovingPictures, then close MovPic, move all the folder+files over from old import path to new one, and then launch MovPic again. All the database reference are perfectly updated, I close and re-open MovPic one more time to make sure no more 'red' marked entries exist and finally remove the old import path and after closing MovPic for the final time can remove old path/drive/etc.

    I'm sure if the toggle setting is used correctly this can be done much 'easier', but it would help to explain that in a few usage examples. For example "Moving collection from old import path to a new one with both import locations available", and "Moving collection from local drive to a UNC share", etc.
     

    Users who are viewing this thread

    Top Bottom