Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
507 stars 35 forks source link

Why auto-resume to last position not work? #11

Closed snowman closed 3 years ago

snowman commented 3 years ago
function on_filename_change(name, value)
   if value then
      resume()
   end
end

mp.observe_property("filename", "native", on_filename_change)

Copied the above script before the following lines: https://github.com/Eisa01/mpv-scripts/blob/d0a05597d3ad25995e6f5669030c81d147c9952a/scripts/SmartHistory-1.6.lua#L182-L190

when runs, it shows 'Resumed Last Position' but always current position is 0

snowman commented 3 years ago
function on_file_loaded()
   resume()
end

mp.register_event("file-loaded", on_file_loaded)