feat: refactor platforms to support multiple TMDB provider IDs per platform

- Replace `tmdbProviderId` (single int) with a many-to-many `platformTmdbProviders` join table so one platform entry can map to multiple TMDB provider IDs (e.g. a single "Max" platform covers several regional TMDB IDs)
- Add `isSubscription` flag to platforms to distinguish subscription services from transactional ones, replacing the old `displayOrder` field in API responses
- Add `getPlatformTmdbIds` / `getPlatformTmdbIdMap` helpers in `@sofa/core/platforms` and thread them through discover, explore, and platform list procedures
- Replace `providerId: number` with `platformId: string` (UUID) in discover input schema so the client never needs to resolve TMDB IDs
- Add `scripts/sync-tmdb-providers.ts` script to pull live provider data from TMDB and update `platforms.json`
- Split native title detail availability into separate "Stream" and "Buy or Rent" sections matching the web pattern
- Add two new DB migrations for the join table and platform schema changes
This commit is contained in:
jake committed 2026-03-24 20:54:34 -04:00
1 parent 7fedccb4fd
commit b0172a2b25
58 files changed
+8291 -907

No files matched your search

+41 -20
View File
@@ -275,6 +275,10 @@ msgstr "4★+"
msgid "5★"
msgstr "5★"
#: apps/web/src/components/library/library-filters.tsx
msgid "70s and earlier"
msgstr "70s and earlier"
#: apps/native/src/components/library/filter-sheet.tsx
msgid "80s"
msgstr "80s"
@@ -284,7 +288,7 @@ msgid "90s"
msgstr "90s"
#: apps/native/src/app/(tabs)/(settings)/index.tsx
#: apps/web/src/components/settings/account-section.tsx
#: apps/web/src/routes/_app/settings.tsx
msgid "Account"
msgstr ""
@@ -451,8 +455,8 @@ msgid "Any year"
msgstr "Any year"
#: apps/web/src/routes/_app/settings.tsx
msgid "App Settings"
msgstr ""
#~ msgid "App Settings"
#~ msgstr ""
#: apps/native/src/app/(tabs)/(settings)/index.tsx
msgid "Application"
@@ -540,8 +544,13 @@ msgid "backups."
msgstr "backups."
#: apps/web/src/components/titles/title-availability.tsx
msgid "Buy"
msgstr ""
#~ msgid "Buy"
#~ msgstr ""
#: apps/native/src/app/title/[id].tsx
#: apps/web/src/components/titles/title-availability.tsx
msgid "Buy or Rent"
msgstr "Buy or Rent"
#: apps/web/src/components/settings/danger-section.tsx
msgid "Cache management"
@@ -661,8 +670,12 @@ msgstr "Choose how to import your {sourceLabel} data."
#~ msgstr "Choose your preferred display language"
#: apps/web/src/components/settings/streaming-services-section.tsx
msgid "Choose your subscriptions"
msgstr "Choose your subscriptions"
msgid "Choose your preferred streaming platforms"
msgstr "Choose your preferred streaming platforms"
#: apps/web/src/components/settings/streaming-services-section.tsx
#~ msgid "Choose your subscriptions"
#~ msgstr "Choose your subscriptions"
#: apps/native/src/app/(tabs)/(library)/index.tsx
#: apps/native/src/app/(tabs)/(library)/index.tsx
@@ -1427,8 +1440,8 @@ msgid "Finished importing your Sofa export."
msgstr "Finished importing your Sofa export."
#: apps/web/src/components/titles/title-availability.tsx
msgid "Free"
msgstr ""
#~ msgid "Free"
#~ msgstr ""
#: apps/web/src/components/settings/danger-section.tsx
msgid "Free up disk space by clearing cached metadata and images"
@@ -1573,7 +1586,7 @@ msgid "Image cache and backup disk usage"
msgstr ""
#: apps/web/src/components/settings/account-section.tsx
#: apps/web/src/components/settings/imports-section.tsx
#: apps/web/src/routes/_app/settings.tsx
msgid "Import"
msgstr ""
@@ -1673,7 +1686,7 @@ msgid "Install the Webhook plugin from Jellyfin's plugin catalog"
msgstr ""
#: apps/native/src/components/settings/integrations-section.tsx
#: apps/web/src/components/settings/integrations-section.tsx
#: apps/web/src/routes/_app/settings.tsx
msgid "Integrations"
msgstr ""
@@ -2346,7 +2359,6 @@ msgstr "Pre-1970"
#: apps/native/src/app/(tabs)/(library)/index.tsx
#: apps/native/src/app/(tabs)/(library)/index.tsx
#: apps/web/src/components/library/library-filters.tsx
#: apps/web/src/components/library/library-filters.tsx
msgid "Pre-1980"
msgstr "Pre-1980"
@@ -2653,8 +2665,8 @@ msgid "Removed from library"
msgstr ""
#: apps/web/src/components/titles/title-availability.tsx
msgid "Rent"
msgstr ""
#~ msgid "Rent"
#~ msgstr ""
#: apps/web/src/routes/setup.tsx
msgid "Request an API key"
@@ -3114,6 +3126,7 @@ msgstr ""
msgid "Storage"
msgstr ""
#: apps/native/src/app/title/[id].tsx
#: apps/web/src/components/titles/title-availability.tsx
msgid "Stream"
msgstr ""
@@ -3123,8 +3136,16 @@ msgid "Streaming"
msgstr "Streaming"
#: apps/web/src/components/settings/streaming-services-section.tsx
msgid "Streaming Services"
msgstr "Streaming Services"
msgid "Streaming data provided by <0/><1>JustWatch</1>"
msgstr "Streaming data provided by <0/><1>JustWatch</1>"
#: apps/web/src/components/settings/streaming-services-section.tsx
#~ msgid "Streaming Services"
#~ msgstr "Streaming Services"
#: apps/web/src/components/settings/streaming-services-section.tsx
msgid "Subscriptions"
msgstr "Subscriptions"
#: apps/web/src/components/settings/backup-schedule-section.tsx
msgid "Sunday"
@@ -3567,8 +3588,8 @@ msgstr ""
#: apps/web/src/components/titles/title-availability.tsx
#: apps/web/src/components/titles/title-availability.tsx
msgid "Watch on {name}"
msgstr ""
#~ msgid "Watch on {name}"
#~ msgstr ""
#: apps/native/src/components/titles/season-accordion.tsx
#: apps/native/src/lib/title-actions.ts
@@ -3651,8 +3672,8 @@ msgid "Where to Watch"
msgstr ""
#: apps/web/src/components/titles/title-availability.tsx
msgid "With Ads"
msgstr ""
#~ msgid "With Ads"
#~ msgstr ""
#: apps/native/src/app/person/[id].tsx
#: apps/native/src/components/search/recently-viewed-row-content.tsx