[Android] PlaylistManager: code cleaning
Geoffrey Métais
git at videolan.org
Fri Apr 5 14:49:42 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 5 14:34:40 2019 +0200| [fc2b033981713a63961662bc68663ccc55aae81b] | committer: Geoffrey Métais
PlaylistManager: code cleaning
> https://code.videolan.org/videolan/vlc-android/commit/fc2b033981713a63961662bc68663ccc55aae81b
---
vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 9af4b91d9..aedcf9db3 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -310,7 +310,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
newMedia = true
determinePrevAndNextIndices()
service.onNewPlayback()
- if (settings.getBoolean(PreferencesFragment.PLAYBACK_HISTORY, true)) launch(Dispatchers.IO) {
+ if (settings.getBoolean(PreferencesFragment.PLAYBACK_HISTORY, true)) AppScope.launch(Dispatchers.IO) {
var id = mw.id
if (id == 0L) {
var internalMedia = medialibrary.findMedia(mw)
@@ -555,8 +555,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
} else {
// normal playback
- if (currentIndex > 0)
- prevIndex = currentIndex - 1
+ if (currentIndex > 0) prevIndex = currentIndex - 1
nextIndex = when {
currentIndex + 1 < size -> currentIndex + 1
repeating == REPEAT_NONE -> -1
@@ -593,7 +592,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
service.onMediaListChanged()
if (mrl !== null && ml.count == 1) {
getCurrentMedia()?.apply {
- launch(Dispatchers.IO) {
+ AppScope.launch(Dispatchers.IO) {
if (stream) {
type = MediaWrapper.TYPE_STREAM
medialibrary.addStream(mrl, title)
More information about the Android
mailing list