mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 15:52:47 +01:00
Improve Watchlist page handling items being watchlisted/unwatchlisted within a given session
This commit is contained in:
@@ -344,9 +344,17 @@
|
||||
cachedServerVersion: null
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields used by progressive Watchlist sections. Must match getWatchlistQuery /
|
||||
* invalidateWatchlistQueries so cache clear hits the same URL as fetch.
|
||||
*/
|
||||
const WATCHLIST_PROGRESSIVE_FIELDS =
|
||||
'PrimaryImageAspectRatio,DateCreated,ProductionYear,PremiereDate,ProviderIds,UserData';
|
||||
|
||||
/**
|
||||
* Build a single top-level Likes query def (shared by getWatchlistItems / getWatchlistQuery).
|
||||
* Callers pass IncludeItemTypes (and other options) to narrow results.
|
||||
* Default Fields match progressive sections so invalidate clears the fetched URL.
|
||||
* @param {Object} options
|
||||
* @returns {{ queryOptions: Object }}
|
||||
*/
|
||||
@@ -356,6 +364,7 @@
|
||||
Recursive: true,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: 'Primary,Backdrop,Thumb',
|
||||
Fields: WATCHLIST_PROGRESSIVE_FIELDS,
|
||||
...options,
|
||||
Filters: 'Likes'
|
||||
}
|
||||
@@ -1501,6 +1510,9 @@
|
||||
return genreSyncScheduledPromise;
|
||||
}
|
||||
|
||||
// Shared with watchlist progressive sections / invalidate (same Fields → same cache URL)
|
||||
apiHelper.WATCHLIST_PROGRESSIVE_FIELDS = WATCHLIST_PROGRESSIVE_FIELDS;
|
||||
|
||||
// Expose apiHelper to global window object
|
||||
window.apiHelper = apiHelper;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user