Skip to content
Snippets Groups Projects
Commit 2bae08a3 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Save playlist on playback start

Allows to be sure if we have video tracks or not
parent a9ec3661
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment