aboutsummaryrefslogtreecommitdiff
path: root/src/lib/AniList
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/AniList')
-rw-r--r--src/lib/AniList/media.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/AniList/media.ts b/src/lib/AniList/media.ts
index 36f042e9..3827feae 100644
--- a/src/lib/AniList/media.ts
+++ b/src/lib/AniList/media.ts
@@ -58,7 +58,8 @@ export const mediaListCollection = async (
userIdentity: UserIdentity,
type: Type,
mediaCache: string | undefined,
- currentLastPruneAt: string | number = 0
+ currentLastPruneAt: string | number,
+ forcePrune: boolean = false
) => {
let currentCacheMinutes;
@@ -75,7 +76,8 @@ export const mediaListCollection = async (
} else {
if (
(new Date().getTime() - Number(currentLastPruneAt)) / 1000 / 60 >
- Number(currentCacheMinutes)
+ Number(currentCacheMinutes) ||
+ forcePrune
) {
if (type === Type.Anime) {
animeLastPrune.set(new Date().getTime().toString());