Chapter body following spec

This commit is contained in:
olaven 2023-03-16 22:50:02 +01:00
parent 3e23bf443e
commit d0031903c2
1 changed files with 5 additions and 1 deletions

View File

@ -14,8 +14,12 @@ export const handler = async (req: Request, _ctx: HandlerContext): Promise<Respo
console.log("going to get ep for ", episodeId); console.log("going to get ep for ", episodeId);
const episode = await nrkRadio.getEpisode(seriesId, episodeId); const episode = await nrkRadio.getEpisode(seriesId, episodeId);
const chapters = toChapters(episode); const chapters = toChapters(episode);
const body = {
version: "1.2.0",
chapters,
}
return new Response(JSON.stringify(chapters), { return new Response(JSON.stringify(body), {
headers: { headers: {
"Content-Type": "application/json+chapters" "Content-Type": "application/json+chapters"
} }