Skip to content

feat: implement podcast:follow tag#3

Draft
nathangathright wants to merge 4 commits intomainfrom
feature/podcast-follow-phase8
Draft

feat: implement podcast:follow tag#3
nathangathright wants to merge 4 commits intomainfrom
feature/podcast-follow-phase8

Conversation

@nathangathright
Copy link

Overview

This PR implements the podcast:follow tag as confirmed for Phase 8 of the Podcast Namespace. The tag allows podcasters to provide a JSON file containing URLs to their podcast on various platforms.

Changes

Core Implementation

  • Created Phase8Follow type: Simple type with required url field
  • Implemented podcastFollow parser: Validates and extracts the URL from the tag
  • Added to FeedObject interface: podcastFollow field in Phase 8 section
  • Registered in phase pipeline: Integrated with existing phase processing system

Tag Specification Compliance

  • Parent: <channel> element
  • Count: Single occurrence (takes first if multiple present)
  • Attributes: url (required) - URL pointing to a JSON file
  • Example: <podcast:follow url="https://examplehost.com/feed/12345678/followlinks.json"/>

Test Coverage

  • ✅ Basic feed identification (no follow tag)
  • ✅ Missing URL attribute handling
  • ✅ Valid URL extraction
  • ✅ Different domain URLs (using Radiotopia domain)
  • ✅ Multiple follow tags (takes first)
  • ✅ Empty URL attribute handling
  • ✅ Whitespace-only URL handling

Quality Assurance

  • ✅ All tests pass (311 total tests)
  • ✅ No linting errors
  • ✅ Clean build successful
  • ✅ No regressions introduced
  • ✅ Follows existing codebase patterns

Implementation Details

The podcast:follow tag is implemented as a feed-level tag that:

  1. Validates the presence of the required url attribute
  2. Extracts the URL for storage in the parsed feed object
  3. Tracks Phase 8 support in the feed's pc20support metadata
  4. Handles edge cases gracefully (missing/empty URLs)

Ready for Review

This implementation provides complete support for the podcast:follow tag specification and is ready for review and merge.

- Create phase-8.ts module with placeholder structure
- Add Phase 8 section to phase index with placeholder comment
- Prepare infrastructure for future Phase 8 tag implementations
- No specific tags implemented yet - ready for development
- Add Phase8Follow type definition with required url field
- Implement podcastFollow parser with proper validation
- Add podcastFollow field to FeedObject interface in Phase 8 section
- Register podcastFollow in phase processing pipeline
- Add comprehensive test coverage (7 test cases)
- Handle edge cases: missing url, empty url, whitespace-only url
- Support multiple follow tags (takes first one)
- All tests pass (311 total tests)
- Clean build successful
- Replace podnews.net URL with radiotopia.fm in test
- Aligns with the Radiotopia feed reference
- All tests still pass (7/7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant