pornganizer / PGV5

Pornganizer V5
https://www.patreon.com/pgv3
123 stars 11 forks source link

Scene duplicate conflict resolution #8

Open pornganizer opened 5 years ago

pornganizer commented 5 years ago

A better way of handling duplicates. Ability to replace a scene with another, leaving all metadata intact.

GernBlanston12 commented 5 years ago

I'm suggesting the duplication handling do the following:

  1. On import of a file with the same file name as another (regardless of hash), ask user if they want to replace, and if "yes", transfer all tags to new file and delete the old file in db and/or file system. This is useful when new encodes/resolutions of the same content become available to the user.
  2. On import of a file with a duplicate hash, check original file location: If the original file is not there, assume user has moved it and simply update the db with the new file location. If it is confirmed in the original location, meaning the import file is indeed a duplicate, do not create new item in db and advise user - This would make replacing drives or moving large numbers of files a cinch.
pornganizer commented 5 years ago

the important thing to keep in mind is that the conflict resolution process has to be for all files imported, not a single file. meaning anything like "advise user" or "ask user" becomes a lot trickier.

GernBlanston12 commented 5 years ago

OK, then if import video has existing hash, PG should check stored location for the original and if it is not there, should import the new file but transfer all tags associated with the original to the new file in the new location (I think updating the location in the db suffices for this). If the import file has same name as an existing file in the db, it should be at least flagged in the log to allow the user to address the situation. It might be handled easily appending and exporting a txt log containing Duplicte Filename Imports and Duplicate Hash Imports. You could, whenever appending such a list, put a date code next to each entry, and user would have a ready file list to prosecute the problem childs with. You're already "advising user" for #2 via the log, as it is.