fix: streaming live tv now works

This commit is contained in:
Fredrik Burmester
2024-10-05 10:24:49 +02:00
parent 387add4c83
commit 1c20a3453f
5 changed files with 86 additions and 103 deletions

View File

@@ -128,10 +128,17 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
return;
}
const res = await getMediaInfoApi(api!).getPlaybackInfo({
itemId: state.item.Id,
userId: user.Id,
});
// Support live tv
const res =
state.item.Type !== "Program"
? await getMediaInfoApi(api!).getPlaybackInfo({
itemId: state.item.Id,
userId: user.Id,
})
: await getMediaInfoApi(api!).getPlaybackInfo({
itemId: state.item.ChannelId!,
userId: user.Id,
});
await postCapabilities({
api,