playback: fix broken play actions
This commit is contained in:
parent
02b7acd1c5
commit
c8571a4df3
2 changed files with 3 additions and 1 deletions
|
@ -267,6 +267,7 @@ constructor(
|
|||
val params = commandFactory.songFromArtist(song, artist, shuffle)
|
||||
if (params != null) {
|
||||
playbackManager.play(params)
|
||||
return
|
||||
}
|
||||
logD(
|
||||
"Cannot use given artist parameter for $song [$artist from ${song.artists}], showing choice dialog")
|
||||
|
@ -277,6 +278,7 @@ constructor(
|
|||
val params = commandFactory.songFromGenre(song, genre, shuffle)
|
||||
if (params != null) {
|
||||
playbackManager.play(params)
|
||||
return
|
||||
}
|
||||
logD(
|
||||
"Cannot use given genre parameter for $song [$genre from ${song.genres}], showing choice dialog")
|
||||
|
|
|
@ -162,7 +162,7 @@ constructor(
|
|||
sort: Sort,
|
||||
shuffle: ShuffleMode
|
||||
): PlaybackCommand? {
|
||||
if (queue.isEmpty() || song !in queue) {
|
||||
if (queue.isEmpty() || (song != null && song !in queue)) {
|
||||
return null
|
||||
}
|
||||
return newCommand(song, parent, sort.songs(queue), shuffle)
|
||||
|
|
Loading…
Reference in a new issue