Fixed api helper function to fetch watchlist items

This commit is contained in:
HighImKevin
2026-02-03 01:28:52 -05:00
parent 272b80194c
commit e9e88d79b8
+2 -1
View File
@@ -272,7 +272,8 @@
const libraryItems = await ApiClient.getItems();
// We now want to include the library items with ColletionType "tvshows", or "movies"
const supportedLibraryItems = libraryItems.Items.filter(item => item.CollectionType === 'tvshows' || item.CollectionType === 'movies');
const supportedCollectionTypes = ['tvshows', 'movies', 'homevideos', 'boxsets', 'playlists'];
const supportedLibraryItems = libraryItems.filter(item => supportedCollectionTypes.includes(item.CollectionType) || !item.CollectionType);
// Now use these support library items as the parent ids for the Items query, since the Items endpoint doesn't support ParentIds as an array we need to make a different call for each library. Querying with the parent id will dramatically reduce the time for the request to return so this is fine
let watchlistItems = [];