Skip to content

feat(podcast): itunes:category subcategory nesting (Apple's two-level taxonomy)#136

Merged
otnc merged 1 commit into
mainfrom
feat/itunes-category-subcategory
Jul 14, 2026
Merged

feat(podcast): itunes:category subcategory nesting (Apple's two-level taxonomy)#136
otnc merged 1 commit into
mainfrom
feat/itunes-category-subcategory

Conversation

@otnc

@otnc otnc commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix bug(s)
  • New feature(s)
  • Others

Supports Apple's two-level itunes:category taxonomy (e.g. "Society &
Culture" → "Documentary") in FeedPodcast.category.

Why?

Apple Podcasts categories are hierarchical, serialized as a nested element:

<itunes:category text="Society &amp; Culture">
  <itunes:category text="Documentary"/>
</itunes:category>

The previous model (category?: string[]) could only emit flat top-level
categories, so a show belonging to a subcategory couldn't express it
without customXml. Several popular subcategories (Documentary, Language
Learning, Tech News, …) are only reachable as subcategories in Apple's
official category list, so this was a practical gap for real shows.

category is now Array<string | { text: string; subcategory?: string }>
— backward-compatible, a plain string still works. An entry with a
subcategory nests a second <itunes:category> inside the parent.
lintInput's !p.category?.length rule keeps working unchanged since the
field stays an array.

Related issue(s)

closes #129

Check

  • Check if duplicate PR(s) already exist.
  • Read CONTRIBUTING.md (rules)
  • Run pnpm check (lint & format)
  • Run pnpm test (functions test)
  • Run pnpm build (dist/)
  • (optional) Run pnpm test:coverage and check nothing new went uncovered

… 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.
@github-actions github-actions Bot added enhancement New feature or request to main for Pull Request to main labels Jul 14, 2026
@otnc otnc merged commit d02c9d7 into main Jul 14, 2026
8 checks passed
@otnc otnc deleted the feat/itunes-category-subcategory branch July 14, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request to main for Pull Request to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Podcast: itunes:category subcategory nesting (Apple's two-level taxonomy)

1 participant