diff --git a/Yattee/Services/Player/PlayerService.swift b/Yattee/Services/Player/PlayerService.swift index d8448cb9..d8c188a8 100644 --- a/Yattee/Services/Player/PlayerService.swift +++ b/Yattee/Services/Player/PlayerService.swift @@ -636,12 +636,20 @@ final class PlayerService { /// Reconciles sleep prevention with what is actually on screen: display sleep /// is only prevented when a video track is rendered. Audio-only playback /// lets the screen sleep normally. + /// + /// tvOS is the exception: idle there means screensaver and then device sleep, + /// which suspends the app, stops playback, and powers the TV off over CEC. + /// Audio-only playback must keep the idle timer disabled as well. private func updateSleepPrevention() { + #if os(tvOS) + sleepPreventionService.preventSleep() + #else if state.currentStream?.isAudioOnly == true { sleepPreventionService.allowSleep() } else { sleepPreventionService.preventSleep() } + #endif } /// Pauses playback.