whyboris / Video-Hub-App

Official repository for Video Hub App
https://videohubapp.com
MIT License
568 stars 174 forks source link

All files double after rescan #723

Open Orthos79 opened 2 years ago

Orthos79 commented 2 years ago

Hello!

All files are double after a rescan. In the details I can see both versions lead to the same destination. The ratings have also been taken over to the duplicates.

Is it possible to remove the second entries (easily), or do I have to restore a backup? And why did this happen?

A rescan can lead to the following results:

Regards Marc

PS: Thanks for you great tool! :)

Orthos79 commented 2 years ago

I just restarted it and the duplicates are gone.

whyboris commented 2 years ago

I'm unsure how duplicates might appear. Did you by chance go to settings -> 4th tab ("Current hub") and add the folder a second time?

If ever the folder is disconnected (because the files are on an external drive that is offline for example), and you connect it to the computer, you could restart VHA and it should be connected.

Do you happen to remember how the duplicates appeared? I'd love to see if it's a bug I can fix.

whyboris commented 2 years ago

I wonder if rescan causes problems the first time a hub is created. I've not run across a duplicate bug, but others have reported it (though it is temporary - upon closing the app, it cleans up duplicates from its view, if they ever occur).

I'll try replicating this way: create a hub, but then add a video file to the directory and click "rescan" 🤔

Anything you remember about how it occurred, please do share. Especially helpful if you can replicate the bug again 👍

Orthos79 commented 2 years ago

I'm unsure how duplicates might appear. Did you by chance go to settings -> 4th tab ("Current hub") and add the folder a second time?

No, I did not add the folder twice. I clicked rescan and all folders were rescanned again. Afterwards the entries were double and partly even triple.

A restart solved it as I mentioned. There's another scan going on right now. I'll let you know if it comes up again.

Orthos79 commented 2 years ago

I had the same problem with the new rescan. But after a restart all is fine again.

After the rescan I clicked on the X and nothing happens. I waited 5 minutes and tried X again. Then it closed after some seconds. DB is fine (and not empty).

RedAero commented 2 years ago

I actually have a bunch of persistent duplicates in one of my hubs, which stay after a restart/rescan, which are 100% identical even in the DB. I suspect they were caused at initialization of the DB, possibly due to an interruption due to my impatience - it's been a while, I don't remember exactly. It's not a major issue, I'll eventually get around to cleaning up the DB manually by hash, but the program could possibly benefit from having a stricter, internal deduplication feature that checks the DB for multiple entries with the same path and hash (as opposed to the standard duplicate finder).

whyboris commented 2 years ago

Thank you RedAero for the report. I will check the de-duplication code to figure out where it might be crapping out. VHA is long-overdue for a bugfix release, but I've been too busy with house stuff 😓 (and a full time job) so it might be closer to summer that the next release will happen 🤞

newadventure079 commented 1 year ago

I'm seeing this too. I have duplicates everywhere

whyboris commented 1 year ago

@newadventure079 - thank you for letting me know. Do the duplicates disappear after closing the app and re-opening, and/or after running a rescan on the input folder?