Skip to content

fix(web): load VOD addon collections natively and restore the Favorite TV row - #791

Merged
ProdigyV21 merged 2 commits into
ProdigyV21:mainfrom
silentbil:claude/vod-cards-load-error-076f62
Oct 7, 2026
Merged

ProdigyV21 merged 2 commits into
ProdigyV21:mainfrom
silentbil:claude/vod-cards-load-error-076f62

Conversation

@silentbil

@silentbil silentbil commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two web fixes for parity with the Android app, one commit each.

1. Addon collections and native addon items (fix(web))

  • Collections backed by an addon catalog failed with "Some sources could not be loaded". Addons installed on Android reach the web through cloud sync with an install id (<manifest id>_<hash>) and their catalogs, resources, types and idPrefixes only inside manifest. The collection lookup matched neither the id nor a catalog, so it threw before making any request. normalizeAddon now falls back to the manifest's fields.
  • Titles from addons that serve their own metadata opened empty ("No episodes found"). The web gave them a positive hash id and sent every lookup to TMDB, which returned 404. The new lib/addonNative.ts ports Android's AddonNativeCatalog:
    • a stable negative id with the same formula as Android, so watch history ids agree;
    • a localStorage registry mapping that id back to the addon;
    • details and episodes from the addon's /meta;
    • streams from the owning addon by the episode's own video id, bypassing the resolver and OpenSubtitles.
  • TMDB logo, provider, review and card-meta lookups, tracker writes and MDBList ratings now skip ids below 1.

2. Favorite TV home row (feat(web))

  • Android shows the profile's favorite IPTV channels as a "Favorite TV" row on Home. The web removed favorite_tv from the catalog list; its earlier web version filled the row with TMDB's top-rated shows.
  • favorite_tv now stays in the catalog list, so the row keeps the user's position. If the list lacks it, the row goes after the others, as on Android. It shows the IPTV favorites in the user's order, minus hidden and locked groups.
  • Playlists only load in Live TV and are too heavy for Home. Each loaded playlist saves a small per-profile copy of just the favorite channels (lib/favoriteTv.ts), and Home draws the row from that copy. The playlist loads quietly in the background (refreshIptv({ quiet: true })) only when no copy exists or a favorite was added since.
  • Adds a "Favorite channels on Home" switch to Settings → TV (IPTV), synced with Android's iptvFavoritesOnHome profile setting.

Notes for reviewers

  • The 3 new UI strings are plain English on purpose, so no translation dictionaries change. They won't be translated.
  • Behavior change from the manifest fallback: Android-installed addons now honor their declared resources and idPrefixes for stream requests, as web-installed addons already do.
  • Not included: deep links for native addon items, addon catalog paging (skip=), and Continue Watching fields for native items.
  • If the container check fails on calendar.test.cjs › "large episode batches coalesce progress…", that test is timing-sensitive (a 25 ms enrichment timeout) and fails intermittently on its own. It loads only calendarLoader.ts with tmdb mocked, which this PR doesn't change.

Testing

  • node --test tests/*.test.cjs: all pass, with new tests in addon-native.test.cjs and favorite-tv.test.cjs. The first commit passes on its own.
  • tsc --noEmit: no new errors.
  • Manual testing in Chrome with a synced account:
    • an addon-backed collection loads;
    • a native addon show opens with its seasons and episodes;
    • an episode's stream lookup and HLS playlist fetch succeed. I didn't see it play: the test tab was in the background, and Chrome doesn't start video in hidden tabs.
  • The Favorite TV row:
    • shows the same channels as Live TV's Favorites;
    • reappears from the saved copy after a reload without downloading the playlist;
    • plays a channel from the row.
  • On a local dev server with no resolver configured, channels that need a request header fail from both Live TV and the new row; production sends those through the resolver relay.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the area: web Changes to web or Netlify sites label Oct 7, 2026
Collections backed by an addon catalog failed with
"Some sources could not be loaded", and their shows opened with "No
episodes found".

Addons installed on Android reach the web through cloud sync with an
install id (<manifest id>_<hash>) and their catalogs, resources, types and
idPrefixes only inside `manifest`. The collection lookup matched neither
the id nor a catalog, so it threw before any request. normalizeAddon now
falls back to the manifest's fields.

The web also had no notion of addon titles without a TMDB identity: they
got a positive hash id and every lookup went to TMDB. Port Android's
AddonNativeCatalog as lib/addonNative.ts: a stable negative id with the
same formula as Android (watch history ids agree), a localStorage registry
mapping it back to the addon, details and episodes from the addon's /meta,
and streams from the owning addon by the episode's own video id. TMDB
logo/provider/review lookups, tracker writes and MDBList ratings skip ids
below 1.
Android shows the profile's favorite IPTV channels as a "Favorite TV" row
on Home; the web dropped the `favorite_tv` catalog entirely (its earlier
web version filled the row with TMDB's top-rated shows instead).

Keep `favorite_tv` in the catalog list so the row sits where the user
placed it (or after the other rows when the list lacks it, as on Android)
and render it from the IPTV favorites, in the user's order, minus hidden
and locked groups. Playlists only load in Live TV and are too heavy for
Home, so each loaded playlist saves a small per-profile copy of just the
favorite channels (lib/favoriteTv.ts) and Home paints the row from it. The
playlist loads quietly in the background only when no copy exists or a
favorite was added since. Now/next shows once a playlist is loaded.

Adds the "Favorite channels on Home" switch to Settings > TV (IPTV),
synced with Android's `iptvFavoritesOnHome` profile setting. The new
wording is plain English, so no translation dictionaries change.
@silentbil
silentbil force-pushed the claude/vod-cards-load-error-076f62 branch from 3116973 to f4abdc5 Compare October 7, 2026 12:23
@silentbil
silentbil requested a review from ProdigyV21 October 7, 2026 13:42
@ProdigyV21
ProdigyV21 merged commit 0749fd5 into ProdigyV21:main Oct 7, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: web Changes to web or Netlify sites

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants