hydrusvideodeduplicator / hydrus-video-deduplicator

Video Deduplicator for the Hydrus Network
https://hydrusvideodeduplicator.github.io/hydrus-video-deduplicator/
MIT License
41 stars 7 forks source link

Bugfix: Avoid Cleared Files Causing Skipped Dupe Searches #30

Closed prof-m closed 1 year ago

prof-m commented 1 year ago

If files are cleared from a database that's already been previously searched, the farthest_search_index of each file in the database becomes out-of-date, which can lead to a wide variety of errors, including old files not being searched for duplicates against new files.

The primary work in this code is to make sure that the farthest_search_index is updated whenever files are cleared from the DB. Additional updates have been made to what's printed out by the program, related to this process, to improve general clarity of output.

NOTE: I highly recommend viewing the file changes with the "hide whitespace changes" enabled - it makes for a cleaner viewing experience, particularly in clear_trashed_files_from_db() where most of the changes are just tab indentations.