From ab9f0608cd3d779b71623e4fa8ff2df149affb64 Mon Sep 17 00:00:00 2001 From: tonihei Date: Mon, 7 Nov 2022 15:16:16 +0000 Subject: [PATCH] Set matching folder type in Session demo app. The folder type is useful metadata to understand programmatically what criterion was used to create the folder. PiperOrigin-RevId: 486653317 --- .../java/androidx/media3/demo/session/MediaItemTree.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt b/demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt index 44457e7ae9..d1ece8ba12 100644 --- a/demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt +++ b/demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt @@ -20,9 +20,11 @@ import android.net.Uri import androidx.media3.common.MediaItem import androidx.media3.common.MediaItem.SubtitleConfiguration import androidx.media3.common.MediaMetadata +import androidx.media3.common.MediaMetadata.FOLDER_TYPE_ALBUMS +import androidx.media3.common.MediaMetadata.FOLDER_TYPE_ARTISTS +import androidx.media3.common.MediaMetadata.FOLDER_TYPE_GENRES import androidx.media3.common.MediaMetadata.FOLDER_TYPE_MIXED import androidx.media3.common.MediaMetadata.FOLDER_TYPE_NONE -import androidx.media3.common.MediaMetadata.FOLDER_TYPE_PLAYLISTS import androidx.media3.common.util.Util import com.google.common.collect.ImmutableList import org.json.JSONObject @@ -205,7 +207,7 @@ object MediaItemTree { title = album, mediaId = albumFolderIdInTree, isPlayable = true, - folderType = FOLDER_TYPE_PLAYLISTS, + folderType = FOLDER_TYPE_ALBUMS, subtitleConfigurations ) ) @@ -221,7 +223,7 @@ object MediaItemTree { title = artist, mediaId = artistFolderIdInTree, isPlayable = true, - folderType = FOLDER_TYPE_PLAYLISTS, + folderType = FOLDER_TYPE_ARTISTS, subtitleConfigurations ) ) @@ -237,7 +239,7 @@ object MediaItemTree { title = genre, mediaId = genreFolderIdInTree, isPlayable = true, - folderType = FOLDER_TYPE_PLAYLISTS, + folderType = FOLDER_TYPE_GENRES, subtitleConfigurations ) )