Add clickable watch links to streaming provider badges

Build a provider registry mapping TMDB provider IDs to search URL
templates. `generateProviderUrl()` resolves a URL for a given provider
and title name using URL-encoded search queries. `readAvailability()`
now accepts the title name and attaches `watchUrl` to each offer.

Provider badges with a resolved URL render as `<a>` links opening in a
new tab; tooltip copy switches from the provider name to "Watch on
{name}". Badges without a known URL remain non-interactive as before.
This commit is contained in:
2026-03-05 20:35:59 -05:00
parent 926ddfef34
commit cd4b2908d8
4 changed files with 145 additions and 5 deletions
+1
View File
@@ -20,6 +20,7 @@ export interface AvailabilityOffer {
providerName: string;
logoPath: string | null;
offerType: string;
watchUrl: string | null;
}
export interface RecommendedTitle {