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
278 stars 20 forks source link

Specify $HOME in mpv_thumbnail_script.conf #55

Closed lamyergeier closed 5 months ago

lamyergeier commented 7 months ago

In ~/.config/mpv/script-opts/mpv_thumbnail_script.conf, I tried to define the following option, but it doesn't work. Is there a way to specify HOME variable?

cache_directory=(os.getenv('HOME'))..'/.cache/thumbnails/mpv-osc-thumbnail'

Instead of storing it in /tmp folder is it better to store it somewhere else as the cache can be reused? Or the thumbnails are regenerated after every play?

marzzzello commented 5 months ago

Make sure you have set XDG_CACHE_HOME, then it will be used: https://github.com/marzzzello/mpv_thumbnail_script/blob/f82a221451879662542676720440b7dc2deb67a1/README.md?plain=1#L67-L72

If you want to use other env vars you need to change default_cache_base: https://github.com/marzzzello/mpv_thumbnail_script/blob/f82a221451879662542676720440b7dc2deb67a1/src/options.lua#L3