mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
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 ab9f0608cd3d779b71623e4fa8ff2df149affb64)
This commit is contained in:
parent
3bad1f326d
commit
13a4089eaf
@ -20,9 +20,11 @@ import android.net.Uri
|
|||||||
import androidx.media3.common.MediaItem
|
import androidx.media3.common.MediaItem
|
||||||
import androidx.media3.common.MediaItem.SubtitleConfiguration
|
import androidx.media3.common.MediaItem.SubtitleConfiguration
|
||||||
import androidx.media3.common.MediaMetadata
|
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_MIXED
|
||||||
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_NONE
|
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_NONE
|
||||||
import androidx.media3.common.MediaMetadata.FOLDER_TYPE_PLAYLISTS
|
|
||||||
import androidx.media3.common.util.Util
|
import androidx.media3.common.util.Util
|
||||||
import com.google.common.collect.ImmutableList
|
import com.google.common.collect.ImmutableList
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
@ -205,7 +207,7 @@ object MediaItemTree {
|
|||||||
title = album,
|
title = album,
|
||||||
mediaId = albumFolderIdInTree,
|
mediaId = albumFolderIdInTree,
|
||||||
isPlayable = true,
|
isPlayable = true,
|
||||||
folderType = FOLDER_TYPE_PLAYLISTS,
|
folderType = FOLDER_TYPE_ALBUMS,
|
||||||
subtitleConfigurations
|
subtitleConfigurations
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -221,7 +223,7 @@ object MediaItemTree {
|
|||||||
title = artist,
|
title = artist,
|
||||||
mediaId = artistFolderIdInTree,
|
mediaId = artistFolderIdInTree,
|
||||||
isPlayable = true,
|
isPlayable = true,
|
||||||
folderType = FOLDER_TYPE_PLAYLISTS,
|
folderType = FOLDER_TYPE_ARTISTS,
|
||||||
subtitleConfigurations
|
subtitleConfigurations
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -237,7 +239,7 @@ object MediaItemTree {
|
|||||||
title = genre,
|
title = genre,
|
||||||
mediaId = genreFolderIdInTree,
|
mediaId = genreFolderIdInTree,
|
||||||
isPlayable = true,
|
isPlayable = true,
|
||||||
folderType = FOLDER_TYPE_PLAYLISTS,
|
folderType = FOLDER_TYPE_GENRES,
|
||||||
subtitleConfigurations
|
subtitleConfigurations
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user