diff options
| author | Fuwn <[email protected]> | 2023-09-19 16:04:25 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-19 16:04:25 -0700 |
| commit | fef3d89d68f47204b9ae4bd5b61d941a2e069db0 (patch) | |
| tree | 2ae3fd6ae487c3d48cf058f21598f81d715d5555 /src | |
| parent | fix(due): move start time to processing (diff) | |
| download | due.moe-fef3d89d68f47204b9ae4bd5b61d941a2e069db0.tar.xz due.moe-fef3d89d68f47204b9ae4bd5b61d941a2e069db0.zip | |
feat(manga): single date construct
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/List/Due/MangaList.svelte | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte index cf7f1017..dce467aa 100644 --- a/src/lib/List/Due/MangaList.svelte +++ b/src/lib/List/Due/MangaList.svelte @@ -40,14 +40,16 @@ if ($lastPruneTimes.chapters === 1) { lastPruneTimes.setKey('chapters', new Date().getTime()); } else { + const currentDate = new Date(); + if ( - (new Date().getTime() - $lastPruneTimes.chapters) / 1000 / 60 > + (currentDate.getTime() - $lastPruneTimes.chapters) / 1000 / 60 > $settings.cacheMangaMinutes ) { const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray(); const ids = unresolved.map((m) => m.id); - lastPruneTimes.setKey('chapters', new Date().getTime()); + lastPruneTimes.setKey('chapters', currentDate.getTime()); await chapterDatabase.chapters.bulkDelete(ids); } } |