|
From: | Yuchen Pei |
Subject: | Re: Recovering playback state of multiple playlists and over multiple sessions |
Date: | Tue, 19 Oct 2021 08:54:44 +1100 |
User-agent: | mu4e 1.4.13; emacs 27.2 |
Yoni Rabkin <yoni@rabkins.net> writes:
Yuchen Pei <hi@ypei.me> writes:Yoni Rabkin <yoni@rabkins.net> writes:Yuchen Pei <hi@ypei.me> writes:Hello, I often have several long playlists of spoken words, mostly conferencetalks and lectures, and I wonder how I can resume where I left from last time. I have them all saved in native playlist files, andload them manually when I start an emacs session. There are two problems:1. Say I have two playlists A and B, A is at track 42 at 23:00 andBis at track 73 at 87:32. I just paused track 42 of A and wouldliketo resume track 73 of B. How do I do that? If I navigate to B andpress RET (emms-playlist-mode-play-smart) or invoke(emms-playlist-mode-play-current-track), track 73 will start from the beginning, rather than 87:32. If I navigate to B and press P, track 42 of A will resume. I also tried switching to playlist B at the metaplaylist first, but that did not seem to help either.2. Say I have one playlist A at track 42 at 23:00. How do I saveit,close emacs and resume at track 42 at 23:00 next time I open emacsand load the playlist? I tried saving the playlist as a native playlist, but when I load it starts from track 1 again.`emms-bookmarks' has code to support this, but it isn't extensively developed because this is an edge case and doesn't come up veryoften. I have used `emms-bookmarks' in the (far) past and I remember it working well enough at the time.Thanks for the pointer.As I understand it emms-bookmarks's goal is to restore the playback position in a media file, but not to restore to the item in a playlist across emacs sessions (my second problem). I tried emms-bookmark-add on an item, switched to another playlist and played something there, and came back to the item, and did emms-bookmark-next. It didn'trestore the position. I'll have to look more into it.The bookmark data is stored natively as part of the track, so it would be written to disk in a emms-playlist-save, and equally read back ofcourse.I don't save emacs sessions generally speaking (desktop-save and etc.), so I can't speak to if the existing emacs packages for saving buffers and restoring them would also do what you want for Emms. Emms playlists are just buffers with "propertized" text after all, so those solutionsshould work (in theory; famous last words).So the answer would require first knowing how you manage saving and restoring sessions in Emacs "grosso modo" and then find out how Emmsfits into that.
I don't really save or restore emacs sessions. This is because I have an emacsclient on all the time until an untimely death because something goes terribly wrong, and if I make it revive from that state I fear it could go into a death loop. This is why I would rather have an emms-specific feature for this.
One of my uses for Emms is to watch video's stored on my disk, and many of them are very long (6 or 4 hour endurance races). In that case I use the mpv backend with its save-position-on-quit option, soboth saving and continuation is handled outside of Emms.I tried save-position-on-quit - it doesn't seem to work on streams over https and ssh, which are the only things I play with emms these days...This also does not address the second problem. I guess I'll have tohack out something myself.Do you think restoring to an item in a playlist across emacs sessionsis also an edge case?See above, and we'll discuss it from there.
-- Best, Yuchen PGP Key: 47F9 D050 1E11 8879 9040 4941 2126 7E93 EF86 DFD0 <https://ypei.me/assets/ypei-pubkey.txt>
signature.asc
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |