fix: autoload looping a file when only a single file in directory

closes #768
This commit is contained in:
tomasklaen
2023-11-04 19:05:14 +01:00
parent 37675d0f55
commit c9826221d0

View File

@@ -421,7 +421,7 @@ end
---@param current_index number
---@param delta number 1 or -1 for forward or backward
function decide_navigation_in_list(paths, current_index, delta)
if #paths < 2 then return #paths, paths[#paths] end
if #paths < 2 then return end
delta = delta < 0 and -1 or 1
-- Shuffle looks at the played files history trimmed to 80% length of the paths