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