fix(explore): render Plex Discover home shelves

Plex Explore showed only the Watchlist row. `/hubs/sections/watchlist`
answers with placeholder hubs — every entry carries `placeholder: true`,
`size: 0` and no `Metadata` — so `fetchHubs` mapped each one to an empty
page and dropped all of them. That is true no matter what the profile has
watchlisted; the shelves never rendered.

Read `/hubs/sections/home` instead, the section Plex's own web client
renders on its Home > Trending tab, and hydrate each placeholder from its
own key (six at a time). `directory` shelves list browse categories and
`clip` shelves list trailers, neither of which becomes a catalog item, so
they are skipped before spending a request. A shelf that fails degrades to
the ones that succeeded; a pass where every shelf failed still throws.

Discover ignores container offsets on hub keys and truncates with `limit`
instead, so a hub is one page: View All takes the whole shelf in a single
request rather than replaying page one, and hub requests drop `Media` and
`Image` elements the catalog layer never reads.
This commit is contained in:
edde746
2026-07-28 05:26:37 +02:00
parent 53535e1678
commit 82d6c5d555
6 changed files with 243 additions and 109 deletions
+2 -2
View File
@@ -207,8 +207,8 @@ class ExploreProvider extends ChangeNotifier with DisposableChangeNotifierMixin
if (isDisposed || generation != _generation) return;
// A debounced watchlist refresh that landed while this load was in
// flight covered later mutations than both the watchlist page and Plex's
// watchlist-derived hubs — keep the fresher versions.
// flight covered later mutations than both the watchlist page and the
// provider hubs that track it — keep the fresher versions.
if (_watchlistRowFetchedEpoch > mutationEpochAtStart) {
fetched.remove(CatalogRowId.watchlist);
fetchedProviderHubs = null;