This commit is contained in:
Fredrik Burmester
2024-11-10 15:21:30 +01:00
parent fff880e708
commit 817e2b3d85
7 changed files with 17 additions and 7 deletions

View File

@@ -45,6 +45,7 @@ export const getStreamUrl = async ({
let sessionId: string | null | undefined;
if (item.Type === "Program") {
console.log("Item is of type program...");
const res0 = await getMediaInfoApi(api).getPlaybackInfo(
{
userId,
@@ -98,6 +99,15 @@ export const getStreamUrl = async ({
}
);
console.log(
"getStreamUrl ~ getMediaInfoApi ~ getPlaybackInfo ~",
res2.status
);
if (res2.status !== 200) {
console.error("Error getting playback info:", res2.status, res2.statusText);
}
sessionId = res2.data.PlaySessionId || null;
mediaSource = res2.data.MediaSources?.find(