From babaca74f2a47c397680a2b01fbb40e7a5c64d94 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Tue, 14 Apr 2026 01:34:21 +0200 Subject: [PATCH] Keep playback alive when dismissing tvOS player with Menu button Calling stop() on Menu-button dismiss cleared currentVideo and tore down the backend, so audio did not continue and the "Now Playing" sidebar tab never appeared. Match the iOS/macOS dismissal path instead and just collapse the fullScreenCover. --- Yattee/Views/Player/tvOS/TVPlayerView.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Yattee/Views/Player/tvOS/TVPlayerView.swift b/Yattee/Views/Player/tvOS/TVPlayerView.swift index bcae4d66..5fbbaaa5 100644 --- a/Yattee/Views/Player/tvOS/TVPlayerView.swift +++ b/Yattee/Views/Player/tvOS/TVPlayerView.swift @@ -467,10 +467,10 @@ struct TVPlayerView: View { } private func dismissPlayer() { - // Save progress and stop player before dismissing (matches iOS/macOS pattern) - // This ensures watch history is updated when user exits player with Menu button - playerService?.stop() - + // Collapse the player but keep it alive so audio continues in the background + // and the "Now Playing" sidebar entry can restore the session. Matches the + // iOS/macOS ExpandedPlayerWindow dismissal path, which also does not stop() + // on dismiss. appEnvironment?.navigationCoordinator.isPlayerExpanded = false dismiss() }