Introduction
Introduction Statistics Contact Development Disclaimer Help
Replace deprecated `table.getn` function with length operator `#` - mpv-jellyfi…
Log
Files
Refs
README
LICENSE
---
commit 7aef1c8f0dfbf7c68456d03bde28d8f972c20617
parent 25c2df0372b1fef15b36401bb9e66c313a037e0c
Author: Sebastien MacDougall-Landry <[email protected]…
Date: Tue, 21 Feb 2023 21:55:36 -0500
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.