fix: list all sessions for remote control/cast
Continuous Integration / build_web (push) Failing after 1s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped

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.
This commit is contained in:
1xDed committed 2026-11-27 14:04:28 +03:00
1 parent 2aa3e4106c
commit 89581e1ba8
2 files changed
+10 -8

No files matched your search

+5 -5
View File
@@ -57,9 +57,7 @@ const RemoteControlDialog = () => {
queryKey: ["remoteSessions"], queryKey: ["remoteSessions"],
queryFn: async () => { queryFn: async () => {
if (!api || !user?.Id) return []; if (!api || !user?.Id) return [];
const result = await getSessionApi(api).getSessions({ const result = await getSessionApi(api).getSessions();
controllableByUserId: user.Id,
});
return result.data; return result.data;
}, },
enabled: open && !!api && !!user?.Id, 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( const remoteSessions = (sessions.data ?? []).filter(
(session) => (session) =>
session.Id && session.Id &&
session.DeviceId !== api?.deviceInfo.id && session.DeviceId !== api?.deviceInfo.id &&
session.SupportsRemoteControl !== false, session.UserId === user?.Id,
); );
const seek = (session: SessionInfoDto, offsetSeconds: number) => { const seek = (session: SessionInfoDto, offsetSeconds: number) => {
@@ -189,7 +189,7 @@ const RemoteControlDialog = () => {
const playState = session.PlayState; const playState = session.PlayState;
const duration = nowPlaying?.RunTimeTicks ?? 0; const duration = nowPlaying?.RunTimeTicks ?? 0;
const position = playState?.PositionTicks ?? 0; const position = playState?.PositionTicks ?? 0;
const supportsControl = session.SupportsRemoteControl !== false; const supportsControl = true;
return ( return (
<React.Fragment key={session.Id}> <React.Fragment key={session.Id}>
<ListItem <ListItem
+5 -3
View File
@@ -26,9 +26,10 @@ const RemotePlaybackBar = () => {
queryKey: ["remoteSessions"], queryKey: ["remoteSessions"],
queryFn: async () => { queryFn: async () => {
if (!api || !user?.Id) return []; if (!api || !user?.Id) return [];
const result = await getSessionApi(api).getSessions({ // Get every session: many Jellyfin clients don't report
controllableByUserId: user.Id, // SupportsRemoteControl, so filtering by controllableByUserId hides
}); // devices that can still receive commands.
const result = await getSessionApi(api).getSessions();
return result.data; return result.data;
}, },
enabled: !!api && !!user?.Id, enabled: !!api && !!user?.Id,
@@ -40,6 +41,7 @@ const RemotePlaybackBar = () => {
(session: SessionInfoDto) => (session: SessionInfoDto) =>
session.Id && session.Id &&
session.DeviceId !== api?.deviceInfo.id && session.DeviceId !== api?.deviceInfo.id &&
session.UserId === user?.Id &&
session.NowPlayingItem, session.NowPlayingItem,
); );