playback: fix broken play actions
This commit is contained in:
@@ -267,6 +267,7 @@ constructor(
|
|||||||
val params = commandFactory.songFromArtist(song, artist, shuffle)
|
val params = commandFactory.songFromArtist(song, artist, shuffle)
|
||||||
if (params != null) {
|
if (params != null) {
|
||||||
playbackManager.play(params)
|
playbackManager.play(params)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
logD(
|
logD(
|
||||||
"Cannot use given artist parameter for $song [$artist from ${song.artists}], showing choice dialog")
|
"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)
|
val params = commandFactory.songFromGenre(song, genre, shuffle)
|
||||||
if (params != null) {
|
if (params != null) {
|
||||||
playbackManager.play(params)
|
playbackManager.play(params)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
logD(
|
logD(
|
||||||
"Cannot use given genre parameter for $song [$genre from ${song.genres}], showing choice dialog")
|
"Cannot use given genre parameter for $song [$genre from ${song.genres}], showing choice dialog")
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ constructor(
|
|||||||
sort: Sort,
|
sort: Sort,
|
||||||
shuffle: ShuffleMode
|
shuffle: ShuffleMode
|
||||||
): PlaybackCommand? {
|
): PlaybackCommand? {
|
||||||
if (queue.isEmpty() || song !in queue) {
|
if (queue.isEmpty() || (song != null && song !in queue)) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return newCommand(song, parent, sort.songs(queue), shuffle)
|
return newCommand(song, parent, sort.songs(queue), shuffle)
|
||||||
|
|||||||
Reference in New Issue
Block a user