[Android] Fix the "audio force shuffle" setting being applied for videos
Nicolas Pomepuy
git at videolan.org
Thu Sep 29 13:33:46 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Sep 29 07:36:30 2022 +0200| [346c032e1b6e7ebc5df66d2fe3e10d4645895caa] | committer: Duncan McNamara
Fix the "audio force shuffle" setting being applied for videos
Fixes #2675
> https://code.videolan.org/videolan/vlc-android/commit/346c032e1b6e7ebc5df66d2fe3e10d4645895caa
---
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 42606a99a..c6efea5f4 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