[Android] Stop service instead of repeating on failure

Geoffrey Métais git at videolan.org
Mon May 7 11:58:21 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon May  7 11:58:01 2018 +0200| [d103df73a439aaa96568a0c7a0ebc91374d6f177] | committer: Geoffrey Métais

Stop service instead of repeating on failure

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

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

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 2a4df5d00..4458f8ff3 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -691,7 +691,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
                 service.showToast(service.getString(
                         R.string.invalid_location,
                         getCurrentMedia()?.getLocation() ?: ""), Toast.LENGTH_SHORT)
-                next()
+                if (currentIndex != nextIndex) next() else stop(true)
             }
         }
         service.onMediaPlayerEvent(event)



More information about the Android mailing list