From 89581e1ba832b3c10d3e1caf32292177a1172e24 Mon Sep 17 00:00:00 2001 From: 1xDed Date: Fri, 27 Nov 2026 14:04:28 +0300 Subject: [PATCH] fix: list all sessions for remote control/cast The server reports SupportsRemoteControl=false on the session DTO even when Capabilities.SupportsMediaControl is true (Android, Web, Finamp), and controllableByUserId filters those out. Query all sessions instead and filter locally by device/user; show the remote playback bar for any active session. --- src/components/remoteControl/index.tsx | 10 +++++----- src/components/remotePlaybackBar/index.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/remoteControl/index.tsx b/src/components/remoteControl/index.tsx index eeaa62a..f50f28d 100644 --- a/src/components/remoteControl/index.tsx +++ b/src/components/remoteControl/index.tsx @@ -57,9 +57,7 @@ const RemoteControlDialog = () => { queryKey: ["remoteSessions"], queryFn: async () => { if (!api || !user?.Id) return []; - const result = await getSessionApi(api).getSessions({ - controllableByUserId: user.Id, - }); + const result = await getSessionApi(api).getSessions(); return result.data; }, enabled: open && !!api && !!user?.Id, @@ -128,11 +126,13 @@ const RemoteControlDialog = () => { }), }); + // Show all other sessions: some clients report SupportsRemoteControl=false + // even though they accept playstate commands, so do not hide them. const remoteSessions = (sessions.data ?? []).filter( (session) => session.Id && session.DeviceId !== api?.deviceInfo.id && - session.SupportsRemoteControl !== false, + session.UserId === user?.Id, ); const seek = (session: SessionInfoDto, offsetSeconds: number) => { @@ -189,7 +189,7 @@ const RemoteControlDialog = () => { const playState = session.PlayState; const duration = nowPlaying?.RunTimeTicks ?? 0; const position = playState?.PositionTicks ?? 0; - const supportsControl = session.SupportsRemoteControl !== false; + const supportsControl = true; return ( { queryKey: ["remoteSessions"], queryFn: async () => { if (!api || !user?.Id) return []; - const result = await getSessionApi(api).getSessions({ - controllableByUserId: user.Id, - }); + // Get every session: many Jellyfin clients don't report + // SupportsRemoteControl, so filtering by controllableByUserId hides + // devices that can still receive commands. + const result = await getSessionApi(api).getSessions(); return result.data; }, enabled: !!api && !!user?.Id, @@ -40,6 +41,7 @@ const RemotePlaybackBar = () => { (session: SessionInfoDto) => session.Id && session.DeviceId !== api?.deviceInfo.id && + session.UserId === user?.Id && session.NowPlayingItem, );