Introduction
Introduction Statistics Contact Development Disclaimer Help
Replace deprecated `table.getn` function with length operator `#` - mpv-jellyfi…
Log
Files
Refs
README
LICENSE
---
commit 563bb60c126152f5fdf920d0129619b614778a9c
parent 25c2df0372b1fef15b36401bb9e66c313a037e0c
Author: meliurwen <[email protected]>
Date: Sun, 19 Feb 2023 14:55:17 +0100
Replace deprecated `table.getn` function with length operator `#`
Diffstat:
M scripts/jellyfin.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/scripts/jellyfin.lua b/scripts/jellyfin.lua
@@ -150,7 +150,7 @@ end
local function key_up()
selection = selection - 1
- if selection == 0 then selection = table.getn(items) end
+ if selection == 0 then selection = #items end
update_data()
end
@@ -176,7 +176,7 @@ end
local function key_down()
selection = selection + 1
- if selection > table.getn(items) then selection = 1 end
+ if selection > #items then selection = 1 end
update_data()
end
@@ -225,7 +225,7 @@ toggle_overlay = function()
mp.add_forced_key_binding("DOWN", "jdown", key_down, { repeata…
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()
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.