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

Script relies on `shared-script-properties` deprecated in mpv release 0.37.0 #49

Open vlnka opened 9 months ago

vlnka commented 9 months ago

The script relies on shared-script-properties deprecated in mpv release 0.37.0. This causes a failure to launch and thus no OSC or thumbnails in the player. mpv throws this error message:

Lua error: mpv_thumbnail_script_client_osc.lua:4466: attempt to call field 'shared_script_property_set' (a nil value)

Example full log where this occurs:

Log ``` [ytdl_hook] Loading lua script @ytdl_hook.lua... [ytdl_hook] loading mp.defaults [mpv_thumbnail_script_client_osc] Loading lua script D:/Programs/mpv/scripts/mpv_thumbnail_script_client_osc.lua... [mpv_thumbnail_script_server] Loading lua script D:/Programs/mpv/scripts/mpv_thumbnail_script_server.lua... [mpv_thumbnail_script_client_osc] loading mp.defaults [mpv_thumbnail_script_server] loading mp.defaults [mpv_thumbnail_script_client_osc] loading file D:/Programs/mpv/scripts/mpv_thumbnail_script_client_osc.lua [ytdl_hook] loading @ytdl_hook.lua [mpv_thumbnail_script_server] loading file D:/Programs/mpv/scripts/mpv_thumbnail_script_server.lua [ytdl_hook] reading options for ytdl_hook [ytdl_hook] script-opts/ytdl_hook.conf not found. [ytdl_hook] lua-settings/ytdl_hook.conf not found. 'uname' is not recognized as an internal or external command, operable program or batch file. [mpv_thumbnail_script_client_osc] reading options for mpv_thumbnail_script [mpv_thumbnail_script_client_osc] Opened config file script-opts/mpv_thumbnail_script.conf. [mpv_thumbnail_script_client_osc] reading options for osc [mpv_thumbnail_script_client_osc] script-opts/osc.conf not found. [mpv_thumbnail_script_client_osc] lua-settings/osc.conf not found. [mpv_thumbnail_script_client_osc] [mpv_thumbnail_script_client_osc] stack traceback: [mpv_thumbnail_script_client_osc] D:/Programs/mpv/scripts/mpv_thumbnail_script_client_osc.lua:4509: in main chunk [mpv_thumbnail_script_client_osc] [C]: at 0x7ff6b7201830 [mpv_thumbnail_script_client_osc] [C]: at 0x7ff6b7200f30 [mpv_thumbnail_script_client_osc] Lua error: D:/Programs/mpv/scripts/mpv_thumbnail_script_client_osc.lua:4466: attempt to call field 'shared_script_property_set' (a nil value) [mpv_thumbnail_script_client_osc] Exiting... 'uname' is not recognized as an internal or external command, operable program or batch file. [mpv_thumbnail_script_server] reading options for mpv_thumbnail_script [mpv_thumbnail_script_server] Opened config file script-opts/mpv_thumbnail_script.conf. [ytdl_hook] ytdl:// hook [ytdl_hook] not a ytdl:// url [ytdl_hook] playlist hook (+) Video --vid=1 (*) (hevc 3840x2160 23.976fps) (+) Audio --aid=1 --alang=eng (*) 'TrueHD Atmos 7.1' (truehd 8ch 48000Hz) File tags: Title: Pearl (2022) [mpv_thumbnail_script_server] Announcing self to master... [file] Cannot open file 'auto': No such file or directory Failed to open auto. Using hardware decoding (d3d11va). [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [ao/wasapi] No suitable audio format found AO: [openal] 44100Hz stereo 2ch float [mpv_thumbnail_script_server] Announcing self to master... VO: [gpu-next] 3840x2160 d3d11[p010] [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Announcing self to master... [mpv_thumbnail_script_server] Thumbnail worker registering timed out ```
po5 commented 9 months ago

For backwards compatibility, mp.del_property (added in the same commit as user-data) can be used to conditionally use user-data over shared script properties. https://github.com/po5/thumbfast/commit/fb9d37e76b97a3a541004556ec19c0620ca308a3