mpv: Update gui interface

This commit is contained in:
Marty Oehme 2023-05-23 15:31:17 +02:00
parent 8a0fd53647
commit 01ca98aa4b
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
29 changed files with 6886 additions and 3569 deletions

View file

@ -5,6 +5,8 @@
--
-- original from https://codeberg.org/jouni/mpv_sponsorblock_minimal
-- adapted for local playback skipping and some refactoring by me
local mp = require 'mp'
local options = {
API = "https://sponsor.ajay.app/api/skipSegments",
@ -31,10 +33,9 @@ local function getranges()
Ranges[k] = v
end
end
return
end
local function skip_ads(name, pos)
local function skip_ads(_, pos)
if pos ~= nil then
for k, v in pairs(Ranges) do
if tonumber(k) <= pos and tonumber(v) > pos then
@ -51,7 +52,6 @@ local function skip_ads(name, pos)
end
end
end
return
end
local function file_loaded()