Persist following properties:
mopidy.core.tracklist
_tl_tracks
_next_tlid
get_consume()
get_random()
get_repeat()
get_single()
mopidy.core.history
_history
mopidy.core.playlist
get_current_tl_track()
get_time_position()
mopidy.core.mixer
get_volume()
Details:
- moved json export/import write_library()/load_library() from mopidy/local to mopidy/models
- new core methods save_state(), load_state()
- save_state(), load_state() accessible via rpc
- save state to disk at stop
- load state from disk at start
- new config: core.restore_state ("off", "load", "play")
TODO:
- seek to play position does not work. Timing issue.
- use extra thread to load state from disk at start?
Instead of changing the signature to add(uri, name) I opted for
renaming it to _add_track(track).
Since it's internal we may change it whenever we like to. Since you need
different logic for extracting an interesting name from a track and from
a ref or a stream title, it makes sense to add another method for adding
refs/stream titles to the history when that time comes.
Fixes#1056