Repository navigation
Discover: episode search, search filters, sub-category and trending charts - #119
Merged
Merged
Conversation
…harts Uses more of Apple's free iTunes / Marketing Tools APIs (all verified live): - Episode search (entity=podcastEpisode): an "Episodes" chip under the search box lists matching episodes across every show. Tapping one stores its show as a preview if needed, finds the episode (by GUID, else audio URL or title) and opens its page, which keeps the download-then-play button. - Show search filters: "In title" (attribute=titleTerm) and "By host" (attribute=artistTerm) beside "Anywhere". - Searches use the chart region's storefront (country=) and ask for 100 results instead of 30. - Sub-category charts: the full Apple category tree (19 categories, 91 sub-categories, e.g. Sport -> Rugby) as a second chip row; picking a category adds the six it previously lacked. - Charts show the top 200 instead of 25 (one batched lookup still resolves every feed URL). - A "Trending episodes" chart per region from rss.marketingtools.apple.com; entries carry only an Apple Podcasts link, so shows are resolved with one lookup of the show ids in those links. onPodcastClick's preview-storing code is shared with episode taps. A search superseded by a newer query or filter no longer surfaces as a "Search failed" snackbar. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RK5hqcE13d42xpsT576dRw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Discover now uses more of Apple's free iTunes / Marketing Tools APIs. Before writing any code, I checked each endpoint against Apple's live servers.
Search
entity=podcastEpisode, so a guest's name finds every show they appeared on.attribute=titleTerm) / By host (attribute=artistTerm). Changing a filter re-runs the query immediately.country=) and ask for 100 results instead of 30. iTunes returns at most 100 podcasts.Charts
lookupstill resolves all 200 feed URLs (checked live).rss.marketingtools.apple.com/api/v2/{cc}/podcasts/top/50/podcast-episodes.json. Entries carry only an Apple Podcasts link, so their shows are resolved with one lookup of the show ids in those links. Lookup by episode id returns nothing.Smaller changes
onPodcastClick's preview-storing code is now shared with episode taps (storePreview,RssEpisode.toEntity).collectLatest) now rethrowsCancellationException. It no longer shows a "Search failed: …cancelled" snackbar.AntennaPod uses the same two iTunes endpoints (
toppodcastsRSS pluslookup) inItunesTopListLoader.Tests
DiscoverViewModelTest: updated thesearch(...)stubs for the new parameters. New tests:PodcastSearchRepositoryIntegrationTest(MockWebServer):attribute,countryandlimitparams;PodcastSearchRepositoryTrendingTest(mocked API): show resolution in one lookup, chart order preserved, unresolvable entries dropped, and no lookup for an empty chart.Testing
Local compilation could not be run: Gradle can't resolve dependencies in the agent environment. The CI
buildcheck (all unit tests plusassembleDebug) is the compile check for this PR.Generated by Claude Code