diff options
| author | Fuwn <[email protected]> | 2023-12-13 18:46:27 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-13 18:46:27 -0800 |
| commit | 451de5a48c80b767d09c505a9055d96f4073fbc4 (patch) | |
| tree | cff296a879fc59fb7d9c5e8de1a2ba67730ee86a | |
| parent | feat(settings): version for debug (diff) | |
| download | due.moe-451de5a48c80b767d09c505a9055d96f4073fbc4.tar.xz due.moe-451de5a48c80b767d09c505a9055d96f4073fbc4.zip | |
fix(manga): long-standing prune filter error
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index d730eb51..65e6de24 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -52,12 +52,11 @@ (currentDate.getTime() - $lastPruneTimes.chapters) / 1000 / 60 > Math.max($settings.cacheMangaMinutes, 5) ) { - const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray(); - const ids = unresolved.map((m) => m.id); - lastPruneTimes.setKey('chapters', currentDate.getTime()); (async () => { - await chapterDatabase.chapters.bulkDelete(ids); + await chapterDatabase.chapters.bulkDelete( + (await chapterDatabase.chapters.toArray()).map((m) => m.id) + ); })(); } } |