[Android] PlaylistManager: fix next regression

Duncan McNamara git at videolan.org
Mon Aug 28 12:24:02 UTC 2023


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Aug  1 10:34:01 2023 +0200| [d6f3ea3b957e4074eab7e06fc61ca42c86dfa246] | committer: Nicolas Pomepuy

PlaylistManager: fix next regression

Removing the repeating.value != REPEAT_MODE_ONE meant that the condition
would be used only when forced, ie pressing next, but not when finishing
a media and going to the next one in the playqueue

> https://code.videolan.org/videolan/vlc-android/commit/d6f3ea3b957e4074eab7e06fc61ca42c86dfa246
---

 application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 1af756247f..81f10b5555 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -278,7 +278,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
     fun next(force : Boolean = false) {
         mediaList.getMedia(currentIndex)?.let { if (it.type == MediaWrapper.TYPE_VIDEO) saveMediaMeta() }
         val size = mediaList.size()
-        if (force) {
+        if (force || repeating.value != PlaybackStateCompat.REPEAT_MODE_ONE) {
             previous.push(currentIndex)
             //startup index given?
             if (startupIndex != -1) {



More information about the Android mailing list