Skip to content

Commit 13a4089

Browse files
toniheimicrokatz
authored andcommitted
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 (cherry picked from commit ab9f060)
1 parent 3bad1f3 commit 13a4089

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

demos/session/src/main/java/androidx/media3/demo/session/MediaItemTree.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ import android.net.Uri
2020
import androidx.media3.common.MediaItem
2121
import androidx.media3.common.MediaItem.SubtitleConfiguration
2222
import androidx.media3.common.MediaMetadata
23+
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_ALBUMS
24+
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_ARTISTS
25+
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_GENRES
2326
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_MIXED
2427
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_NONE
25-
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_PLAYLISTS
2628
import androidx.media3.common.util.Util
2729
import com.google.common.collect.ImmutableList
2830
import org.json.JSONObject
@@ -205,7 +207,7 @@ object MediaItemTree {
205207
title = album,
206208
mediaId = albumFolderIdInTree,
207209
isPlayable = true,
208-
folderType = FOLDER_TYPE_PLAYLISTS,
210+
folderType = FOLDER_TYPE_ALBUMS,
209211
subtitleConfigurations
210212
)
211213
)
@@ -221,7 +223,7 @@ object MediaItemTree {
221223
title = artist,
222224
mediaId = artistFolderIdInTree,
223225
isPlayable = true,
224-
folderType = FOLDER_TYPE_PLAYLISTS,
226+
folderType = FOLDER_TYPE_ARTISTS,
225227
subtitleConfigurations
226228
)
227229
)
@@ -237,7 +239,7 @@ object MediaItemTree {
237239
title = genre,
238240
mediaId = genreFolderIdInTree,
239241
isPlayable = true,
240-
folderType = FOLDER_TYPE_PLAYLISTS,
242+
folderType = FOLDER_TYPE_GENRES,
241243
subtitleConfigurations
242244
)
243245
)

0 commit comments

Comments
 (0)