Fixing Castfeedvalidator Errors #9

Merged
olaven merged 5 commits from fix/pass-castfeed-validator into main 2023-03-16 17:11:14 +00:00
1 changed files with 13 additions and 1 deletions

View File

@ -7,7 +7,7 @@ function toItemTag(episode: Episode) {
const description = episode.titles.subtitle || ""; const description = episode.titles.subtitle || "";
return tag("item", [ return tag("item", [
tag("title", episode.titles.title), tag("title", episode.titles.title),
tag("link", episode.url), tag("link", episode._links.share.href),
tag("description", description), tag("description", description),
tag("itunes:summary", description), tag("itunes:summary", description),
tag("guid", episode.id, [["isPermaLink", "false"]]), tag("guid", episode.id, [["isPermaLink", "false"]]),
@ -39,6 +39,18 @@ async function buildFeed(seriesId: string) {
tag("title", serie.titles.title), tag("title", serie.titles.title),
tag("link", linkValue), tag("link", linkValue),
tag("itunes:author", "NRK"), 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( tag(
"description", "description",
serie.titles.subtitle || "" serie.titles.subtitle || ""