fix(media_player): channel-title fallback gated to the channel app (TIVIMATE_PACKAGE or audio_playback membership) — launcher never shows a channel number (F1)

This commit is contained in:
James Mackay committed 2026-10-08 10:52:08 +01:00
1 parent f58be9ed05
commit 392553ee26
2 files changed
+53 -1

No files matched your search

@@ -57,6 +57,7 @@ from .const import (
DOMAIN,
PROTOCOL_MEDIA_KEYS,
PROTOCOL_REMOTE_KEYS,
TIVIMATE_PACKAGE,
)
from .ha_adb_common import PlaybackIntent, running_apps_from_tasks
from .jellyfin import fetch_session_media_info
@@ -651,7 +652,11 @@ class NvidiaShieldMediaPlayer(MediaPlayerEntity):
state = "playing" if info.playing else "paused"
# Privacy mode: identity stays the app, never the media title
title = None if not self._adb_store_info else info.title
if title is None:
if title is None and self._last_channel and (
# F1: the channel number belongs to the channel app only — never
# leak it to the launcher or another foreground app.
foreground == TIVIMATE_PACKAGE or foreground in manager.audio_playback
):
title = self._last_channel
if title is None and not self._adb_store_info:
title = self.app_name or self.app_id or foreground