Merge pull request 'Fix playlist playback' (#3) from nixx/mpv_sponsorblock_minimal:fix-playlist into master

Reviewed-on: https://codeberg.org/jouni/mpv_sponsorblock_minimal/pulls/3
This commit is contained in:
jouni 2021-08-07 17:56:50 +02:00
commit b1ed75df1a
1 changed files with 8 additions and 0 deletions

View File

@ -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)