Add shuffle parameter to playback intent (#1813)
## Description Adds an optional boolean parameter `shuffle` that is read for the playback intent. When true, it will cause the resulting media to be shuffled if applicable. Something can be shuffled if the `itemId` is a grouping on media such as a playlist, series, season, or even library. ### Related issues Depends on #1756 ### Testing Emulator with the documented command ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
e94e82479b
commit
bd1a6c44ee
4 changed files with 22 additions and 3 deletions
|
|
@ -103,11 +103,13 @@ class IntentService
|
|||
|
||||
"com.github.damontecres.wholphin.PLAYBACK", "play" -> {
|
||||
val position = intent.getLongParam("position")?.coerceAtLeast(0)
|
||||
val shuffle = intent.getBooleanExtra("shuffle", false)
|
||||
|
||||
val playbackDestination =
|
||||
Destination.Playback(
|
||||
itemId = itemId,
|
||||
positionMs = position ?: 0L,
|
||||
shuffle = shuffle,
|
||||
)
|
||||
|
||||
if (itemDestination is Destination.Playback) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue