Commit 2bae08a3 authored by Geoffrey Métais's avatar Geoffrey Métais

Save playlist on playback start

Allows to be sure if we have video tracks or not
parent a9ec3661
......@@ -138,9 +138,6 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
private fun onPlaylistLoaded() {
service.onPlaylistLoaded()
saveMediaList()
savePosition(true)
saveCurrentMedia()
launch(UI, CoroutineStart.UNDISPATCHED) { determinePrevAndNextIndices() }
}
......@@ -648,6 +645,9 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
seekToResume(mw)
loadMediaMeta(mw)
if (mw.type == MediaWrapper.TYPE_STREAM) medialibrary.addToHistory(mw.location, mw.title)
saveMediaList()
savePosition(true)
saveCurrentMedia()
}
}
MediaPlayer.Event.Paused -> medialibrary.resumeBackgroundOperations()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment