Currently, the script attempts to write the user ID and the sponsorblock DB within the "sponsorblock_shared" directory. However, the directory in which the script is located isn't always writable (for example when the script is installed through a system package manager and used with mpv --scripts=[path to script]).
A more standard location would perhaps be $XDG_CACHE_HOME/mpv/scripts/sponsorblock/sponsorblock.{txt,db} on Linux. I'm not sure whether similar standard paths are defined on other platforms though.
Currently, the script attempts to write the user ID and the sponsorblock DB within the "sponsorblock_shared" directory. However, the directory in which the script is located isn't always writable (for example when the script is installed through a system package manager and used with
mpv --scripts=[path to script]
).A more standard location would perhaps be
$XDG_CACHE_HOME/mpv/scripts/sponsorblock/sponsorblock.{txt,db}
on Linux. I'm not sure whether similar standard paths are defined on other platforms though.https://github.com/NixOS/nixpkgs/pull/92507#discussion_r450492245