marzzzello / mpv_thumbnail_script

A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies (fork)
GNU General Public License v3.0
270 stars 20 forks source link

thumbnailer_shared: use full filename path for remote URLs #45

Closed olifre closed 11 months ago

olifre commented 1 year ago

The actual filename part is often similar for different URLs, so use the full path and let it be cleaned or hashed accordingly.

Closes #44

NicolaSmaniotto commented 11 months ago

It makes sense to consider use the whole path, but I don't like the use of the path itself as a filename (it usually contains special characters like /). Using the hash of the path seems more robust, there already is an implementation of SHA-1 in the repo.

olifre commented 11 months ago

Good point! I've updated the PR accordingly, i.e. now the full path is still used for URLs, but any remote paths are always hashed not matter the length.

NicolaSmaniotto commented 11 months ago

Looks good, thanks