From d0ff23a8243c9b2135085e135d79277a7bdc7ad8 Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Sat, 4 Mar 2017 20:01:27 +0100 Subject: [PATCH] COMPOSER and ALBART id's are > SONG These types can not have a Play All in the context menu as the 'jumpSong' in SongTimeline only works if the required information is available in the filled projection (which is not the case for these types) --- .../android/vanilla/LibraryPagerAdapter.java | 5 ++-- .../android/vanilla/MediaUtils.java | 24 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/ch/blinkenlights/android/vanilla/LibraryPagerAdapter.java b/src/ch/blinkenlights/android/vanilla/LibraryPagerAdapter.java index 502848e8..63f8f094 100644 --- a/src/ch/blinkenlights/android/vanilla/LibraryPagerAdapter.java +++ b/src/ch/blinkenlights/android/vanilla/LibraryPagerAdapter.java @@ -68,9 +68,8 @@ public class LibraryPagerAdapter * The human-readable title for each list. The positions correspond to the * MediaUtils ids, so e.g. TITLES[MediaUtils.TYPE_SONG] = R.string.songs */ - public static final int[] TITLES = { R.string.artists, R.string.albumartists, R.string.composers, - R.string.albums, R.string.songs, R.string.playlists, - R.string.genres, R.string.files }; + public static final int[] TITLES = { R.string.artists, R.string.albums, R.string.songs, R.string.playlists, + R.string.genres, R.string.albumartists, R.string.composers, R.string.files }; /** * Default tab order. */ diff --git a/src/ch/blinkenlights/android/vanilla/MediaUtils.java b/src/ch/blinkenlights/android/vanilla/MediaUtils.java index c79e665f..bb1ac58f 100644 --- a/src/ch/blinkenlights/android/vanilla/MediaUtils.java +++ b/src/ch/blinkenlights/android/vanilla/MediaUtils.java @@ -62,30 +62,30 @@ public class MediaUtils { * Type indicating an id represents an artist. */ public static final int TYPE_ARTIST = 0; - /** - * Type indicating an id represents an albumartist - */ - public static final int TYPE_ALBARTIST = 1; - /** - * Type indicating an id represents a composer - */ - public static final int TYPE_COMPOSER = 2; /** * Type indicating an id represents an album. */ - public static final int TYPE_ALBUM = 3; + public static final int TYPE_ALBUM = 1; /** * Type indicating an id represents a song. */ - public static final int TYPE_SONG = 4; + public static final int TYPE_SONG = 2; /** * Type indicating an id represents a playlist. */ - public static final int TYPE_PLAYLIST = 5; + public static final int TYPE_PLAYLIST = 3; /** * Type indicating ids represent genres. */ - public static final int TYPE_GENRE = 6; + public static final int TYPE_GENRE = 4; + /** + * Type indicating an id represents an albumartist + */ + public static final int TYPE_ALBARTIST = 5; + /** + * Type indicating an id represents a composer + */ + public static final int TYPE_COMPOSER = 6; /** * Special type for files and folders. Most methods do not accept this type * since files have no MediaStore id and require special handling.