From 3f5ae22f99ac2407bbcab70653936910631f9e8f Mon Sep 17 00:00:00 2001 From: Inrixia Date: Tue, 24 Dec 2024 14:13:51 +1300 Subject: [PATCH] PlaylistCache - Fix loadListItemsPage intercept fixes #107 --- plugins/_lib/Caches/PlaylistItemCache.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/_lib/Caches/PlaylistItemCache.ts b/plugins/_lib/Caches/PlaylistItemCache.ts index b4e351e..baef919 100644 --- a/plugins/_lib/Caches/PlaylistItemCache.ts +++ b/plugins/_lib/Caches/PlaylistItemCache.ts @@ -21,9 +21,13 @@ export class PlaylistCache { public static async updateTrackItems(playlistUUID: ItemId) { const result = await interceptPromise( () => actions.content.loadListItemsPage({ loadAll: true, listName: `playlists/${playlistUUID}`, listType: "mediaItems" }), - ["content/LOAD_LIST_ITEMS_PAGE_SUCCESS"], + [ + "content/LOAD_LIST_ITEMS_PAGE_SUCCESS", + // @ts-expect-error Outdated types + "content/LOAD_LIST_ITEMS_PAGE_SUCCESS_MODIFIED", + ], ["content/LOAD_LIST_ITEMS_PAGE_FAIL"], - { timeoutMs: 2000 } + { timeoutMs: 3000 } ).catch(libTrace.warn.withContext("PlaylistCache.getTrackItems.interceptPromise")); if (result?.[0]?.items === undefined) { const playlistTrackItems = await this._trackItemsCache.get(playlistUUID);