[Android] Media: return the title without the extension to match previous behaviour
Jean-Baptiste Kempf
git at videolan.org
Tue Oct 2 17:30:15 CEST 2012
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Oct 2 17:29:53 2012 +0200| [955ed3cad9861a90050b391dd86fae7f0d9fb8d8] | committer: Jean-Baptiste Kempf
Media: return the title without the extension to match previous behaviour
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=955ed3cad9861a90050b391dd86fae7f0d9fb8d8
---
vlc-android/src/org/videolan/vlc/Media.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/Media.java b/vlc-android/src/org/videolan/vlc/Media.java
index 5706468..b767e4d 100644
--- a/vlc-android/src/org/videolan/vlc/Media.java
+++ b/vlc-android/src/org/videolan/vlc/Media.java
@@ -294,8 +294,10 @@ public class Media implements Comparable<Media> {
public String getTitle() {
if (mTitle != null)
return mTitle;
- else
- return getFileName();
+ else {
+ int end = getFileName().lastIndexOf(".");
+ return getFileName().substring(0, end);
+ }
}
public String getArtist() {
More information about the Android
mailing list