[Android] Prevent grouping videos starting with "The"

Geoffrey Métais git at videolan.org
Thu Apr 14 17:30:35 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 14 17:28:37 2016 +0200| [3adb4940310c2ca82d448218d7d3300155fc4dd3] | committer: Geoffrey Métais

Prevent grouping videos starting with "The"

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

 vlc-android/src/org/videolan/vlc/media/MediaGroup.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaGroup.java b/vlc-android/src/org/videolan/vlc/media/MediaGroup.java
index 5fe34d5..91cc044 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaGroup.java
+++ b/vlc-android/src/org/videolan/vlc/media/MediaGroup.java
@@ -98,6 +98,9 @@ public class MediaGroup extends MediaWrapper {
             String group = mediaGroup.getTitle();
             String item = media.getTitle();
 
+            if (item.length() > 4 && (item.startsWith("The") || item.startsWith("the")))
+                item = item.substring(4);
+
             // find common prefix
             int commonLength = 0;
             int minLength = Math.min(group.length(), item.length());



More information about the Android mailing list