[Android] Reset shuffle when playlist size is < 3
Geoffrey Métais
git at videolan.org
Wed Jan 7 11:42:15 CET 2015
vlc-ports/android | branch: 1.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan 7 11:15:15 2015 +0100| [6d5f3900279c9d72eab7b126a6161a0adc689ae5] | committer: Geoffrey Métais
Reset shuffle when playlist size is < 3
(cherry picked from commit 99b3282e35ea3ee8cd024427e82353ceb1b7ab4b)
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6d5f3900279c9d72eab7b126a6161a0adc689ae5
---
vlc-android/src/org/videolan/vlc/audio/AudioService.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/audio/AudioService.java b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
index 67df1f2..724a0d1 100644
--- a/vlc-android/src/org/videolan/vlc/audio/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
@@ -842,6 +842,7 @@ public class AudioService extends Service {
if (mNextIndex == -1) {
// No subitems; play the next item.
int size = mLibVLC.getMediaList().size();
+ mShuffling &= size > 2;
// Repeating once doesn't change the index
if (mRepeating == RepeatType.Once) {
@@ -1280,11 +1281,18 @@ public class AudioService extends Service {
@Override
public void remove(int position) {
mLibVLC.getMediaList().remove(position);
+
+ AudioService.this.saveMediaList();
+ determinePrevAndNextIndices();
+ executeUpdate();
}
@Override
public void removeLocation(String location) {
mLibVLC.getMediaList().remove(location);
+ AudioService.this.saveMediaList();
+ determinePrevAndNextIndices();
+ executeUpdate();
}
@Override
More information about the Android
mailing list