[Android] Save playlist on playback start
Geoffrey Métais
git at videolan.org
Tue Jan 30 11:01:10 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 30 10:23:47 2018 +0100| [2bae08a361cc9bb7673841bf590ca769d4438018] | committer: Geoffrey Métais
Save playlist on playback start
Allows to be sure if we have video tracks or not
> https://code.videolan.org/videolan/vlc-android/commit/2bae08a361cc9bb7673841bf590ca769d4438018
---
vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 496c2745c..0058eb6a6 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -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()
More information about the Android
mailing list