[Android] Audio : remove useless code and improve Song view sort

Alexandre Perraud git at videolan.org
Fri Oct 30 17:54:24 CET 2015


vlc-ports/android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Fri Oct 30 17:36:19 2015 +0100| [bdbe88280fa6c9e822054e1d1303e4b0ded77c8e] | committer: Alexandre Perraud

Audio : remove useless code and improve Song view sort

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=bdbe88280fa6c9e822054e1d1303e4b0ded77c8e
---

 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java   |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index 3e012f6..5a93e05 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -145,7 +145,6 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
             mediaKey = (title + subTitle).toLowerCase(Locale.getDefault());
         else
             mediaKey = key.trim().toLowerCase(Locale.getDefault());
-        if(subTitle != null) subTitle = subTitle.trim();
         if (mMediaItemMap.containsKey(mediaKey))
             mMediaItemMap.get(mediaKey).mMediaList.add(media);
         else {
@@ -185,6 +184,10 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
                             key = null;
                             break;
                         case TYPE_SONGS:
+                            title = media.getTitle();
+                            subTitle = Util.getMediaArtist(mContext, media);
+                            key = media.getAlbum() + media.getArtist() + media.getLocation();
+                            break;
                         default:
                             title = media.getTitle();
                             subTitle = Util.getMediaArtist(mContext, media);



More information about the Android mailing list