[Android] Genres in vlc-android should be case insensitive
Edward Wang
git at videolan.org
Fri Jun 29 03:13:58 CEST 2012
android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Jun 28 21:13:20 2012 -0400| [e97d066d4974fcead846f01ca6c910692293a1dd] | committer: Edward Wang
Genres in vlc-android should be case insensitive
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=e97d066d4974fcead846f01ca6c910692293a1dd
---
vlc-android/src/org/videolan/vlc/Media.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/Media.java b/vlc-android/src/org/videolan/vlc/Media.java
index 4cc7a55..fcfccc9 100644
--- a/vlc-android/src/org/videolan/vlc/Media.java
+++ b/vlc-android/src/org/videolan/vlc/Media.java
@@ -256,7 +256,10 @@ public class Media implements Comparable<Media> {
}
public String getGenre() {
- return mGenre;
+ if(mGenre == VLCApplication.getAppContext().getString(R.string.unknown_genre))
+ return mGenre;
+ else /* Make genres case insensitive via normalisation */
+ return Character.toUpperCase(mGenre.charAt(0)) + mGenre.substring(1).toLowerCase();
}
public String getCopyright() {
More information about the Android
mailing list