feat(podcast): itunes:category subcategory nesting (Apple's two-level taxonomy)#136
Merged
Conversation
… taxonomy)
FeedPodcast.category was string[], which can only emit flat top-level
categories, so a show that belongs to a subcategory (e.g. "Society &
Culture" -> "Documentary") couldn't express it without customXml —
several popular Apple subcategories are only reachable that way.
category is now Array<string | { text: string; subcategory?: string }>,
backward-compatible with plain strings. An entry with a subcategory
nests a second <itunes:category> inside the parent, matching Apple's
documented shape. lintInput's "!p.category?.length" rule keeps
working unchanged since the field stays an array.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supports Apple's two-level
itunes:categorytaxonomy (e.g. "Society &Culture" → "Documentary") in
FeedPodcast.category.Why?
Apple Podcasts categories are hierarchical, serialized as a nested element:
The previous model (
category?: string[]) could only emit flat top-levelcategories, so a show belonging to a subcategory couldn't express it
without
customXml. Several popular subcategories (Documentary, LanguageLearning, Tech News, …) are only reachable as subcategories in Apple's
official category list, so this was a practical gap for real shows.
categoryis nowArray<string | { text: string; subcategory?: string }>— backward-compatible, a plain string still works. An entry with a
subcategorynests a second<itunes:category>inside the parent.lintInput's!p.category?.lengthrule keeps working unchanged since thefield stays an array.
Related issue(s)
closes #129
Check
CONTRIBUTING.md(rules)pnpm check(lint & format)pnpm test(functions test)pnpm build(dist/)pnpm test:coverageand check nothing new went uncovered