Merge branch 'main' into testing - mpv-jellyfin - MPV script for adding an interface for Jellyfin.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 048486f98183fe562606f66055e9fce02b5e5d71
 (DIR) parent 8bec6ae51093850eb2850c5f1242b77f5d93a74b
 (HTM) Author: Sebastien MacDougall-Landry <60635017+EmperorPenguin18@users.noreply.github.com>
       Date:   Thu, 23 May 2024 21:38:05 -0400
       
       Merge branch 'main' into testing
       Diffstat:
         M scripts/jellyfin.lua                |       6 +++---
       
       1 file changed, 3 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/scripts/jellyfin.lua b/scripts/jellyfin.lua
       @@ -184,7 +184,7 @@ end
        local function key_up()
                if #items > 1 then
                        selection[layer] = selection[layer] - 1
       -                if selection[layer] == 0 then selection[layer] = table.getn(items) end
       +                if selection[layer] == 0 then selection[layer] = #items end
                        update_data()
                end
        end
       @@ -204,7 +204,7 @@ end
        local function key_down()
                if #items > 1 then
                        selection[layer] = selection[layer] + 1
       -                if selection[layer] > table.getn(items) then selection[layer] = 1 end
       +                if selection[layer] > #items then selection[layer] = 1 end
                        update_data()
                end
        end
       @@ -244,7 +244,7 @@ toggle_overlay = function()
                        mp.add_forced_key_binding("DOWN", "jdown", key_down, { repeatable = true })
                        mp.add_forced_key_binding("LEFT", "jleft", key_left)
                        if not connected then connect() end
       -                if table.getn(items) == 0 then
       +                if #items == 0 then
                                update_overlay()
                        else
                                update_data()