From 28abe3c86a46cc6070d7db2f964937fe5b9573a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20Sundf=C3=B8r?= Date: Thu, 16 Mar 2023 18:11:14 +0100 Subject: [PATCH] Fixing Castfeedvalidator Errors (#9) --- routes/api/feeds/[seriesId].ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/routes/api/feeds/[seriesId].ts b/routes/api/feeds/[seriesId].ts index 963092b..3772feb 100644 --- a/routes/api/feeds/[seriesId].ts +++ b/routes/api/feeds/[seriesId].ts @@ -7,7 +7,7 @@ function toItemTag(episode: Episode) { const description = episode.titles.subtitle || ""; return tag("item", [ tag("title", episode.titles.title), - tag("link", episode.url), + tag("link", episode._links.share.href), tag("description", description), tag("itunes:summary", description), tag("guid", episode.id, [["isPermaLink", "false"]]), @@ -39,6 +39,18 @@ async function buildFeed(seriesId: string) { tag("title", serie.titles.title), tag("link", linkValue), tag("itunes:author", "NRK"), + /* serie.category.id does not overlap with Apple's supported categories.. + These podcast feeds are not going to be indexed in itunes anyways, so + a static, valid category is fine. The point is simply to pass third party + podcast feed validation. + */ + tag("itunes:category", "", [["text", "Government"]]), + tag("itunes:owner", + [ + tag("itunes:name", "NRK"), + tag("itunes:email", "nrkpodcast@nrk.no") + ] + ), tag( "description", serie.titles.subtitle || ""