Browse Source

Unload ranges and turn off on end of file

master
nixx 11 months ago
parent
commit
a6a97fa09c
  1. 8
      sponsorblock_minimal.lua

8
sponsorblock_minimal.lua

@ -77,6 +77,13 @@ function file_loaded()
return
end
function end_file()
if not ON then return end
mp.unobserve_property(skip_ads)
ranges = nil
ON = false
end
function toggle()
if ON then
mp.unobserve_property(skip_ads)
@ -91,3 +98,4 @@ function toggle()
end
mp.register_event("file-loaded", file_loaded)
mp.register_event("end-file", end_file)