Skip to content

Dedupe podcast episodes re-uploaded to YouTube in home feed - #485

Open
rejas wants to merge 1 commit into
prereleasefrom
fix/dedupe-podcast-youtube-feed
Open

Dedupe podcast episodes re-uploaded to YouTube in home feed#485
rejas wants to merge 1 commit into
prereleasefrom
fix/dedupe-podcast-youtube-feed

Conversation

@rejas

@rejas rejas commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Podcast episodes get re-uploaded to YouTube (titled "Podcast <episode title>"), so both the podcast and yt fetchers were surfacing the same episode as two separate home-feed entries.
  • FetcherUtilities.removeDuplicates only dedupes by post.id, and podcast episode GUIDs / YouTube video IDs never overlap, so no existing dedup step caught this.
  • Adds removeYouTubePodcastDuplicates, called before the id-based dedup in fetchAndProcessPosts. It normalizes titles (case, whitespace, dash variants, strips the "Podcast " prefix) and drops the YouTube post when a matching podcast post is present in the same batch.
  • Verified the title pattern against the live feeds (podigee RSS vs. the YouTube channel RSS) — e.g. "Folge 25: Danger Dan, die Heizhammer-Lüge entlarvt..." vs. "Podcast Folge 25: Danger Dan, die Heizhammer-Lüge entlarvt...".
  • If podcast content is disabled for the user, no podcast post ever reaches this step, so the YouTube upload is left untouched and still appears — this was requested behavior, not incidental.

Test plan

  • pnpm check:ts — clean
  • pnpm lint:fix — 0 errors (pre-existing unrelated warnings only)
  • pnpm check (type check + spell check) — clean
  • pnpm test — 135 suites / 1041 tests passing, including new coverage for removeYouTubePodcastDuplicates (match/no-podcast-present/non-YouTube-shaped-post cases)

🤖 Generated with Claude Code

Podcast episodes are also uploaded to YouTube (titled "Podcast <episode
title>"), so both fetchers were surfacing the same episode as two separate
feed entries — removeDuplicates only dedupes by post.id, and podcast/YouTube
IDs never overlap.

Adds a title-based cross-source dedup step that drops the YouTube upload when
a matching podcast post is present in the same batch. If podcast content is
disabled for the user, no podcast post reaches this step, so the YouTube
upload is left untouched and still shows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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