forked from TheAMM/mpv_thumbnail_script
-
-
Notifications
You must be signed in to change notification settings - Fork 22
857: bad argument #1 to 'max' (number expected, got nil) #24
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description of the bug
Sometimes I get this error:
[mpv_thumbnail_script_client_osc]
[mpv_thumbnail_script_client_osc] stack traceback:
[mpv_thumbnail_script_client_osc] [string "/etc/mpv/scripts/mpv_thumbnail_script_client_..."]:857: in function 'on_thumb_progress'
[mpv_thumbnail_script_client_osc] [string "/etc/mpv/scripts/mpv_thumbnail_script_client_..."]:1061: in function 'handler'
[mpv_thumbnail_script_client_osc] mp.defaults:380: in function 'handler'
[mpv_thumbnail_script_client_osc] mp.defaults:510: in function 'call_event_handlers'
[mpv_thumbnail_script_client_osc] mp.defaults:555: in function 'dispatch_events'
[mpv_thumbnail_script_client_osc] mp.defaults:503: in function <mp.defaults:502>
[mpv_thumbnail_script_client_osc] [C]: at 0x5577b85ca4b0
[mpv_thumbnail_script_client_osc] [C]: at 0x5577b85cb000
[mpv_thumbnail_script_client_osc] Lua error: [string "/etc/mpv/scripts/mpv_thumbnail_script_client_..."]:857: bad argument #1 to 'max' (number expected, got nil)
That line is here.
It may only be caused when going through a playlist of videos. Could you fallback to 0 if self.state.thumbnails[index] gives nil?
To Reproduce
Steps to reproduce the behavior:
- Run playlist and skip videos with enter
- See error
Expected behavior
Should not error.
Debug log
None yet.
Log
Environment
- OS: Linux
- mpv version: 0.34.1
- mpv_thumbnail_script version: 0.4.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working