| some bugs - mpv-jellyfin - MPV script for adding an interface for Jellyfin. | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 82287f28b23837a9da748f872c72c7cc6764d43a | |
| parent 9220ad8195ee3e8f844bc1fb5f205c96c31f3450 | |
| Author: EmperorPenguin18 <[email protected]> | |
| Date: Thu, 23 May 2024 23:23:54 -0400 | |
| some bugs | |
| Diffstat: | |
| M scripts/jellyfin.lua | 13 +++++++------ | |
| 1 file changed, 7 insertions(+), 6 deletions(-) | |
| --- | |
| diff --git a/scripts/jellyfin.lua b/scripts/jellyfin.lua | |
| @@ -19,13 +19,13 @@ local api_key = "" | |
| local parent_id = {"", "", ""} | |
| local selection = {1, 1, 1} | |
| +local list_start = {1, 1, 1} | |
| local layer = 1 | |
| local items = {} | |
| local ow, oh, op = 0, 0, 0 | |
| local video_id = "" | |
| local async = nil | |
| -local list_start = 1 | |
| local toggle_overlay -- function | |
| @@ -61,12 +61,12 @@ end | |
| local function update_list() | |
| overlay.data = "" | |
| local magic_num = 29 -- const | |
| - if selection[layer] - list_start > magic_num then | |
| - list_start = selection[layer] - magic_num | |
| - elseif selection[layer] - list_start < 0 then | |
| - list_start = selection[layer] | |
| + if selection[layer] - list_start[layer] > magic_num then | |
| + list_start[layer] = selection[layer] - magic_num | |
| + elseif selection[layer] - list_start[layer] < 0 then | |
| + list_start[layer] = selection[layer] | |
| end | |
| - for i=list_start,list_start+magic_num do | |
| + for i=list_start[layer],list_start[layer]+magic_num do | |
| if i > #items then break end | |
| local index = "" | |
| if items[i].IndexNumber and items[i].IsFolder == false then | |
| @@ -258,6 +258,7 @@ local function check_percent() | |
| if pos then | |
| if pos > 95 and #video_id > 0 then | |
| send_request("POST", options.url.."/Users/"..user_id..… | |
| + items[selection[layer]].UserData.Played = true | |
| video_id = "" | |
| end | |
| end |