Skip to content

Commit

Permalink
PlaylistCache - Fix loadListItemsPage intercept
Browse files Browse the repository at this point in the history
fixes #107
  • Loading branch information
Inrixia committed Dec 24, 2024
1 parent e7e58cb commit 3f5ae22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/_lib/Caches/PlaylistItemCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3f5ae22

Please sign in to comment.