Playback: Allow video->audio transition if paused

Fix #1110
This commit is contained in:
Geoffrey Métais
2019-12-04 14:16:27 +01:00
committed by Nicolas Pomepuy
parent 2d1c3754c4
commit 6e81a5a655

View File

@@ -1087,8 +1087,7 @@ class PlaybackService : MediaBrowserServiceCompat(), CoroutineScope by MainScope
@MainThread
fun showWithoutParse(index: Int) {
playlistManager.setVideoTrackEnabled(false)
val media = playlistManager.getMedia(index)
if (media == null || !isPlaying) return
val media = playlistManager.getMedia(index) ?: return
// Show an URI without interrupting/losing the current stream
if (BuildConfig.DEBUG) Log.v(TAG, "Showing index " + index + " with playing URI " + media.uri)
playlistManager.currentIndex = index