fix(jellyfin): make terminal play work with a running app and report progress (#288)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-10 17:27:48 -07:00
1 parent 78eca52b7e
commit 78a9b6346f
33 files changed
+934 -924

No files matched your search

@@ -9,6 +9,12 @@ import {
type JellyfinRemotePlayHandlerDeps,
} from './jellyfin-remote-commands';
const noopReporter = {
reportPlaying: async () => {},
reportProgress: async () => {},
reportStopped: async () => {},
};
test('getConfiguredJellyfinSession returns null for incomplete config', () => {
assert.equal(
getConfiguredJellyfinSession({
@@ -122,7 +128,11 @@ test('createHandleJellyfinRemotePlay logs and skips payload without item id', as
test('createHandleJellyfinRemotePlay ignores duplicate play for active item', async () => {
const { handlePlay, played } = makePlayHandler({
getActivePlayback: () => ({ itemId: 'item-1', playMethod: 'DirectPlay' }),
getActivePlayback: () => ({
itemId: 'item-1',
playMethod: 'DirectPlay',
reporter: noopReporter,
}),
});
await handlePlay({ ItemIds: ['item-1'] });
@@ -207,6 +217,7 @@ test('createHandleJellyfinRemoteGeneralCommand mutates active playback indices',
const playback: ActiveJellyfinRemotePlaybackState = {
itemId: 'item-1',
playMethod: 'DirectPlay',
reporter: noopReporter,
audioStreamIndex: null,
subtitleStreamIndex: null,
};