Skip to content

YT Music: Fix syncing 'Episodes for later' in podcast library sync#3582

Merged
MarvinSchenkel merged 3 commits intomusic-assistant:devfrom
teancom:fix/youtube-podcast-crash
Apr 7, 2026
Merged

YT Music: Fix syncing 'Episodes for later' in podcast library sync#3582
MarvinSchenkel merged 3 commits intomusic-assistant:devfrom
teancom:fix/youtube-podcast-crash

Conversation

@teancom
Copy link
Copy Markdown
Contributor

@teancom teancom commented Apr 5, 2026

Found this while trying to figure out a different issue.

ytmusicapi.get_library_podcasts() returns special auto-playlists like "Episodes for Later" (podcastId: "SE") alongside real podcasts. These aren't actual podcasts, so fetching episodes via ytm.get_podcast() returns HTTP 400. Filter them using the existing YT_PERSONAL_PLAYLISTS tuple, matching how playlist sync already handles them.

ytmusicapi.get_library_podcasts() returns special auto-playlists like
"Episodes for Later" (podcastId: "SE") alongside real podcasts. These
aren't actual podcasts, so fetching episodes via ytm.get_podcast()
returns HTTP 400. Filter them using the existing YT_PERSONAL_PLAYLISTS
tuple, matching how playlist sync already handles them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MarvinSchenkel
Copy link
Copy Markdown
Contributor

Not sure if I agree with this logic. I guess we just have to treat this like we do with Liked Music (LM) in playlists. Now we are blindly filtering 'Episodes for Later' which is definitely something nice to have. Options I see:

  • Treat SE as a special podcast id just like we do for LM
  • Filter SE from podcasts, but expose them as a RecommendationFolder.

I think I prefer the former as it is a nice way for people to jump in

Instead of filtering SE from podcast sync entirely, handle it like
Liked Music (LM) is handled for playlists: allow it through the
auto-playlist filter and use the playlist API (instead of the podcast
API) to fetch its details and episodes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@teancom
Copy link
Copy Markdown
Contributor Author

teancom commented Apr 5, 2026

That makes sense. What about this approach? Also, I was going to add some tests for this and saw there weren't any. I don't want to add them to this PR but would you like a different PR to add some test structure and basic tests for this provider? I might be able to do that in the near-term.

@MarvinSchenkel MarvinSchenkel changed the title fix(ytmusic): filter auto-playlists from podcast library sync YT Music: Fix syncing 'Episodes for later' in podcast library sync Apr 7, 2026
@MarvinSchenkel
Copy link
Copy Markdown
Contributor

I just had a play with it and it turns out that ytmusicapi cannot parse those 'Personal podcast / playlists' as podcasts, neither as playlist. So let's just ignore those for now as we cannot parse them.

This will make sure the podcast sync task succeeds again and people can listen to podcasts from YT Music

Copy link
Copy Markdown
Contributor

@MarvinSchenkel MarvinSchenkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @teancom 👏

@MarvinSchenkel MarvinSchenkel enabled auto-merge (squash) April 7, 2026 06:46
@MarvinSchenkel MarvinSchenkel merged commit 1b959e5 into music-assistant:dev Apr 7, 2026
6 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 7, 2026
…3582)

Found this while trying to figure out a different issue.

ytmusicapi.get_library_podcasts() returns special auto-playlists like
"Episodes for Later" (podcastId: "SE") alongside real podcasts. These
aren't actual podcasts, so fetching episodes via ytm.get_podcast()
returns HTTP 400. Filter them using the existing YT_PERSONAL_PLAYLISTS
tuple, matching how playlist sync already handles them.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Marvin Schenkel <marvinschenkel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants