Skip to content

Playlist flat rows and SearchHit share one entry rule - #51

Merged
thorwhalen merged 2 commits into
mainfrom
flat-rows-shared-parser-47
Oct 27, 2026
Merged

thorwhalen merged 2 commits into
mainfrom
flat-rows-shared-parser-47

Conversation

@thorwhalen

Copy link
Copy Markdown
Collaborator

Closes #47 (non-breaking scope).

search_youtube hits and youtube_playlist_info(flat=True) rows now read a flat yt-dlp entry through one rule (_entry_url: the entry's own url, else webpage_url); the search hit adds a watch-URL fallback, the playlist row keeps None (playlists may come from non-YouTube extractors). Public return types are unchanged, so no caller breaks. Not done: making youtube_playlist_info return SearchHit (a public return-type break): if wanted, it can be a dict-compatible SearchHit in a later minor release.

Adversarial review (Opus): OK to land. Its one real finding (the first version synthesised a YouTube watch URL for playlist rows without a URL, wrong for other sites) is fixed: playlist rows never invent a URL, and a test pins it. Also noted: a no-id search hit now has url="" instead of watch?v=.

thorwhalen and others added 2 commits October 27, 2026 01:26
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…review)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@thorwhalen
thorwhalen merged commit 2aeb749 into main Oct 27, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the flat-rows-shared-parser-47 branch October 27, 2026 01:34
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.

Unify flat playlist rows with SearchHit

1 participant