diff --git a/android/app/src/main/java/com/fabledsword/minstrel/player/output/OutputPickerController.kt b/android/app/src/main/java/com/fabledsword/minstrel/player/output/OutputPickerController.kt index e322dd0f..bef9838b 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/player/output/OutputPickerController.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/player/output/OutputPickerController.kt @@ -429,7 +429,10 @@ class OutputPickerController @Inject constructor( */ private fun handleRemoteDrop() { val capturedPositionMs = remoteState.positionMs - val wasPlayingRemote = remoteState.isPlaying + // Resume on the operator's last play-intent, not the observed remote + // state: after a pause, isPlaying is false, but a failed play() that + // triggered this drop means the operator DID ask to play -- honor it. + val wasPlayingRemote = remoteState.lastPlayIntent activeUpnpHolder.set(null) activeUpnpHolder.setTarget(null) selectedUpnpRouteIdInternal.value = null @@ -552,6 +555,9 @@ class OutputPickerController @Inject constructor( rendering = rendering, ), ) + // Selecting a route loads the queue and Plays on the renderer, so + // the standing intent is "play" -- a later drop should resume local. + remoteState.setPlayIntent(true) }.onFailure { e -> Timber.w(e, "UPnP select failed for route ${effectiveRoute.id}") activeUpnpHolder.set(null)