mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.29k stars 2.9k forks source link

Save playhead position when quitting in an ambiguous way #11560

Open forthrin opened 1 year ago

forthrin commented 1 year ago

Before requesting a new feature make sure it hasn't been requested yet. https://github.com/mpv-player/mpv/labels/meta%3Afeature-request

Expected behavior of the wanted feature

Now and then, while playing media A, I double-click another media B in Finder, and immediately realise that the playhead position of media A was lost, and go ARGH!!, as I have to search manually back to the position when returning to media A.

I know --save-position-on-quit, but saving position on quit is something I want to do just occasionally, not for every media file. The default behaviour should be to start at the beginning, while resuming is the exception when wanted.

If pressing Q and Shift+Q, it is clear what the user wants, but when clicking another file it is ambiguous. Could a change be made so that position is saved when it is not clear what the user wants? (Eg. when clicking another file)

PS! Why is the watch_later filename obfuscated? And where in the code can I find the variables on which it is based?

Alternative behavior of the wanted feature

Log file

N/A

dexeonify commented 1 year ago

PS! Why is the watch_later filename obfuscated? And where in the code can I find the variables on which it is based?

Try --write-filename-in-watch-later-config

Traneptora commented 1 year ago

What are you actually asking for? Just push Shift+Q. The watch-later config keeps track of the start time per-file.

forthrin commented 1 year ago

@thebombzen: In a world where all actions were thoroughly contemplated, you are right. But this is an impulse thing. Some times you double-click a file and realise -- too late -- that you just lost the playhead of the previous file.

I don't have a set solution, and invite all good ideas. Best so far: Always save the last playhead, so that you can easily resume that one if you make the mistake of quitting in a way that does not preserve playhead. (In practice, that probably means saving the two last playheads, so the current one doesn't overwrite the previous one when you switch back!)

iTunes lets you tag files manually as "Remember playback position". Books, Podcasts and Videos have this by default, while Music does not. The rationale for Videos having this is that on an iPad/iPod, you most likely consume videos once. Whereas on a desktop with a much larger variety of media content, you can't make this assumption in the same way.