diff options
| author | Fuwn <[email protected]> | 2023-09-01 00:08:40 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-01 00:08:40 -0700 |
| commit | 0b957291eb52a31c5b96ec92dab5bbb64125291a (patch) | |
| tree | afc0996f56ca617a964ccc418ef8ae1e3d8e0334 /src/lib/AniList | |
| parent | fix(page): user identity getter (diff) | |
| download | due.moe-0b957291eb52a31c5b96ec92dab5bbb64125291a.tar.xz due.moe-0b957291eb52a31c5b96ec92dab5bbb64125291a.zip | |
fix(due): better increment follow-up
Diffstat (limited to 'src/lib/AniList')
| -rw-r--r-- | src/lib/AniList/media.ts | 6 |
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()); |