occivink / mpv-gallery-view

Gallery-view scripts for mpv
The Unlicense
189 stars 20 forks source link

Better thumbnail management #50

Closed JimPancakes closed 8 months ago

JimPancakes commented 8 months ago

Let's say I play some video files in a folder and the script generates some thumbs. Now if I move those same videos someplace else or rename the folder they're in and play them again then the script will generate another set of thumbs ignoring the ones already generated.

This happens to me often and was wondering if there's any way to make the script recognize the video by filename or something. I got familiar with the script itself quite a bit and would appreciate any pointers.

occivink commented 8 months ago

Have you found a suitable solution? I recalled somebody suggested that the thumbnails could be stored in a hidden directory right next to the files themselves, and I think this could solve your issue. The hash would have to be changed to be only generated based on the filename, rather the full path.

JimPancakes commented 8 months ago

What I did was edit the code so that what was passed to "sha256" was the filename and the directory it was in. This worked for me since I move my files around allot but keep them in their original folder.