[Android] fix minor bug with video groups (when video title match the group name)
Sébastien Toque
git at videolan.org
Mon Oct 21 21:10:08 CEST 2013
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Mon Oct 21 21:09:12 2013 +0200| [a3c9b165b7d835e61549691d9069c2c99c59412f] | committer: Sébastien Toque
fix minor bug with video groups (when video title match the group name)
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a3c9b165b7d835e61549691d9069c2c99c59412f
---
vlc-android/src/org/videolan/vlc/MediaGroup.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/MediaGroup.java b/vlc-android/src/org/videolan/vlc/MediaGroup.java
index b8185c2..7a107b1 100644
--- a/vlc-android/src/org/videolan/vlc/MediaGroup.java
+++ b/vlc-android/src/org/videolan/vlc/MediaGroup.java
@@ -98,10 +98,10 @@ public class MediaGroup extends Media {
++commonLength;
// same prefix name, just add
- if (commonLength == group.length())
+ if (commonLength == group.length() && mediaGroup.size() > 0)
mediaGroup.add(media);
// not the same prefix, but close : merge
- else if (commonLength > 0 && commonLength < group.length() && commonLength > MIN_GROUP_LENGTH)
+ else if (commonLength > 0 && (commonLength < group.length() || mediaGroup.size() == 0) && commonLength > MIN_GROUP_LENGTH)
mediaGroup.merge(media, group.subSequence(0, commonLength).toString());
else
continue;
More information about the Android
mailing list