Restore state from where the program stopped last time (autoplay track/playlist)
If I stopped psst when I was playing a track, I would like it to auto-play the same track when I restart psst. Similar to saving volumne and other parameters, can we save the most recently played track in config and restore that state once the program is relaunched ?
Let me know if this makes sense. I will be happy to implement this.
This is definitely wanted. I'd like to as well save and restore the current route. I will eventually get to it, but in case you'd like to tackle this yourself, I'm happy to assist.
After looking into this issue, it looks to me like you can't easily intercept the QUIT_APP command because it is handled by druid.
It seems like the delegate's command handler https://github.com/jpochyla/psst/blob/7c2152d559411c197536a65b484ab67672bc4725/psst-gui/src/delegate.rs#L53 doesn't receive that command. (In fact, I also tried adding the event() function and couldn't even get any of the close-window events.)
Is there a way to execute some code when the application is quit?
I think we can re-save the config after every route change.
So would the route or the playback be serialized and saved to file?
Current route is now stored in config and restored on startup as of 6c31eb3.
I noticed that the route is saved and restored (e.g. the playlist page), but I would also like it to save/restore the currently playing song. When I quit and reopen Psst, I would like it to bring up the previous song in the paused state, so I can hit space bar to continue playing. (This is how the official Spotify client works.) Would that be difficult to add?