Fixing Castfeedvalidator Errors (#9)

This commit is contained in:
Olav Sundfør 2023-03-16 18:11:14 +01:00 committed by GitHub
parent d77ec44757
commit 28abe3c86a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -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 || ""