You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #307. Base branch: ytmusicapi-2. Read the contributor guide from #982 before starting.
The hardest Phase 2 issue and the one that depends on all three core entity models. Best picked up once #983–#985 have landed and a few other Phase 2 issues have shaken out the patterns.
Scope
search in mixins/search.py — results across all filters: songs, videos, albums, artists, playlists, podcasts, episodes, profiles, community playlists, featured playlists, uploads
get_search_suggestions, including detailed_runs=True, which currently returns list[str] | JsonList
Watch out for
The return type is a union discriminated by resultType. Model it so consumers can narrow on resultType and get the right fields — a single model with every field optional would defeat the point of this whole effort.
scope="library" and scope="uploads" return different shapes from the default scope.
ignore_spelling and the top-result shelf produce entries that differ from the regular result rows.
Part of #307. Base branch:
ytmusicapi-2. Read the contributor guide from #982 before starting.The hardest Phase 2 issue and the one that depends on all three core entity models. Best picked up once #983–#985 have landed and a few other Phase 2 issues have shaken out the patterns.
Scope
searchinmixins/search.py— results across all filters: songs, videos, albums, artists, playlists, podcasts, episodes, profiles, community playlists, featured playlists, uploadsget_search_suggestions, includingdetailed_runs=True, which currently returnslist[str] | JsonListWatch out for
resultType. Model it so consumers can narrow onresultTypeand get the right fields — a single model with every field optional would defeat the point of this whole effort.scope="library"andscope="uploads"return different shapes from the default scope.ignore_spellingand the top-result shelf produce entries that differ from the regular result rows.browseId(test: skip podcast search results without a browseId #976) must stay tolerated.Definition of done
resultTypehas a model and narrowing works in mypy.get_search_suggestionsis properly typed for bothdetailed_runsvalues, ideally via overloads likeget_lyricsuses.mypy --strictclean.