mpv icon indicating copy to clipboard operation
mpv copied to clipboard

reset `start` in watch later cache file when EOF

Open hooke007 opened this issue 3 years ago • 8 comments

  1. start mpv with save-position-on-quit=yes and keep-open=yes
  2. play a video and let it reach the end
  3. exit and re-run mpv to play the same file
  4. the video paused at the last frame

Expected behavior of the wanted feature

the video should start from the 00:00:00 instead of 'paused at the last frame'

Log file

N/A Not a bug

hooke007 avatar Oct 23 '22 21:10 hooke007

I don't see why changing this behavior is better than the existing behavior. If someone pushes Shift+Q when paused on the last frame, ideally it should restore back to where they were.

Traneptora avatar Oct 23 '22 22:10 Traneptora

I opened every file in my device, all of them paused at the last frame, I believe nobody would think it is a reasonable behavior.

hooke007 avatar Oct 23 '22 22:10 hooke007

This is exactly what I'd expect to happen if you had save-position-on-quit=yes set when running mpv.

Traneptora avatar Oct 23 '22 22:10 Traneptora

There's a workaround for this in https://github.com/mpv-player/mpv/issues/2045#issuecomment-1125025340

...unless you want to save the other states and only change the start paramater?

dexeonify avatar Oct 24 '22 03:10 dexeonify

...unless you want to save the other states and only change the start paramater?

Yes and that's why I renamed the issue's title.

hooke007 avatar Oct 24 '22 03:10 hooke007

It'd probably be better to modify watch-later so that it doesn't always have to save start like it currently does. In that case, you could just remove it from watch-later-options if you hit this condition.

Dudemanguy avatar Oct 24 '22 15:10 Dudemanguy

Do you mean ——

[no saving start eof]
profile-cond=eof_reached
watch-later-options-remove=start

But start would never be removed.

hooke007 avatar Oct 24 '22 16:10 hooke007

But start would never be removed.

Right because the code currently always sets start. I'm saying ideally the logic should be changed to make it possible to remove that.

Dudemanguy avatar Oct 24 '22 16:10 Dudemanguy