[Android] Fix the "audio force shuffle" setting being applied for videos
Nicolas Pomepuy
git at videolan.org
Fri Sep 30 09:06:27 UTC 2022
vlc-android | branch: 3.5.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Sep 29 07:36:30 2022 +0200| [6cbdac99cc2a1967a3c277d9768be1c5f645f274] | committer: Duncan McNamara
Fix the "audio force shuffle" setting being applied for videos
Fixes #2675
> https://code.videolan.org/videolan/vlc-android/commit/6cbdac99cc2a1967a3c277d9768be1c5f645f274
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 66006ece6..8db40502f 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -191,7 +191,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
service.onMediaListChanged()
service.showNotification()
}
- if (settings.getBoolean(KEY_AUDIO_FORCE_SHUFFLE, false) && !shuffling && canShuffle()) shuffle()
+ if (settings.getBoolean(KEY_AUDIO_FORCE_SHUFFLE, false) && getCurrentMedia()?.type == MediaWrapper.TYPE_AUDIO && !shuffling && canShuffle()) shuffle()
}
@Volatile
@@ -864,7 +864,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
mediaList.addEventListener(this)
addUpdateActor.trySend(Unit)
- if (settings.getBoolean(KEY_AUDIO_FORCE_SHUFFLE, false) && !shuffling && canShuffle()) shuffle()
+ if (settings.getBoolean(KEY_AUDIO_FORCE_SHUFFLE, false) && getCurrentMedia()?.type == MediaWrapper.TYPE_AUDIO && !shuffling && canShuffle()) shuffle()
}
/**
More information about the Android
mailing list