[Android] [PATCH] Trim audio metadata

Geoffrey Métais geoffrey.metais at gmail.com
Wed Dec 3 19:40:01 CET 2014


---
 libvlc/src/org/videolan/libvlc/Media.java | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index eb556a9..6d6d948 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -177,16 +177,12 @@ public class Media implements Comparable<Media> {
                 mType = TYPE_AUDIO;
             } else if (track.Type == TrackInfo.TYPE_META) {
                 mLength = track.Length;
-                mTitle = track.Title;
-                mArtist = getValueWrapper(track.Artist, UnknownStringType.Artist);
-                mAlbum = getValueWrapper(track.Album, UnknownStringType.Album);
-                mGenre = getValueWrapper(track.Genre, UnknownStringType.Genre);
+                mTitle = track.Title.trim();
+                mArtist = getValueWrapper(track.Artist, UnknownStringType.Artist).trim();
+                mAlbum = getValueWrapper(track.Album, UnknownStringType.Album).trim();
+                mGenre = getValueWrapper(track.Genre, UnknownStringType.Genre).trim();
                 mArtworkURL = track.ArtworkURL;
                 mNowPlaying = track.NowPlaying;
-                Log.d(TAG, "Title " + mTitle);
-                Log.d(TAG, "Artist " + mArtist);
-                Log.d(TAG, "Genre " + mGenre);
-                Log.d(TAG, "Album " + mAlbum);
             }
         }
 
-- 
1.9.1



More information about the Android mailing list