Video-hub-app: Files with identical hashes open wrong file

Created on 11 Jan 2019  ยท  4Comments  ยท  Source: whyboris/Video-Hub-App

Minor issue with the new hash, should be easily fixed!

When you have duplicates of the same file, and they have the same hash, clicking on one to open it will opened the "last" version of the file! This is because openVideo(hash) takes a hash value, so it picks the last one with the matching hash, as they all share the same one!

To fix this, openVideo() should take the video path instead! ๐Ÿ‘

bug regression

All 4 comments

This can be fixed simply after #108 lands -- since it adds index to each _ImageElement_ -- we can simply use that to uniquely find the file ๐Ÿ™†โ€โ™‚๏ธ

Am I correct that we can remove the fileMap now, and just use the index for everything?

I think that's the case -- the index also coincides with the index in the "finalArray" (one containing all the videos referenced in the hub).

A tad of history: in version 1.0.0 - 1.3.0 there was a number that used to refer to the screenshot file name. But as you removed video files and added new ones to the source directory and re-scanned, the indexes would become misaligned, so I created a fileMap which would be generated when the app ran. Now that we insert the unique index when the _vha_ file is opened, I'm 99.9% sure the fileMap is safe to remove ๐Ÿ‘Œ

One quick spot-check to do after removing it: do a file name search to filter out most of the videos, click on any of the resulting videos. If the correct file opens, we likely have no bugs ๐Ÿ˜…

PR ready to fix this and the same issue for tagging when #116 merges! ๐Ÿ‘

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cal2195 picture cal2195  ยท  5Comments

cal2195 picture cal2195  ยท  4Comments

cal2195 picture cal2195  ยท  4Comments

cal2195 picture cal2195  ยท  5Comments

cal2195 picture cal2195  ยท  4Comments