diff options
| author | Fuwn <[email protected]> | 2023-09-25 21:33:11 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-25 21:33:11 -0700 |
| commit | 59c404317de10d04119089ad4eddfbc1a49740b4 (patch) | |
| tree | db7cc73979ff6ca1946d16010a92992eb7aa8647 /src/lib/Media | |
| parent | refactor(history): move to tools (diff) | |
| download | due.moe-59c404317de10d04119089ad4eddfbc1a49740b4.tar.xz due.moe-59c404317de10d04119089ad4eddfbc1a49740b4.zip | |
feat(manga): replace list titles
Diffstat (limited to 'src/lib/Media')
| -rw-r--r-- | src/lib/Media/manga.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/Media/manga.ts b/src/lib/Media/manga.ts index c2bbf5db..9d0e08a6 100644 --- a/src/lib/Media/manga.ts +++ b/src/lib/Media/manga.ts @@ -1,7 +1,16 @@ import { recentMediaActivities, type Media } from '$lib/AniList/media'; +import manga from '../../stores/manga'; import type { UserIdentity } from '../AniList/identity'; import { chapterDatabase } from './chapters'; +export const pruneAllManga = async () => { + const all = await chapterDatabase.chapters.toArray(); + const ids = all.map((m) => m.id); + + manga.set(''); + await chapterDatabase.chapters.bulkDelete(ids); +}; + export const chapterCount = async ( identity: UserIdentity, manga: Media, |