diff options
| author | Fuwn <[email protected]> | 2026-03-28 09:04:14 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-28 09:04:14 +0000 |
| commit | ebd08256f7c4b754e75eab02c110b689278e197f (patch) | |
| tree | d6a198ebeef943f58cf109ab7721a5a4b9769552 /src/lib | |
| parent | fix(state): restore persisted list UI state (diff) | |
| download | due.moe-ebd08256f7c4b754e75eab02c110b689278e197f.tar.xz due.moe-ebd08256f7c4b754e75eab02c110b689278e197f.zip | |
fix(anilist): restore completed list query semantics
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/Data/AniList/cacheHydration.ts | 3 | ||||
| -rw-r--r-- | src/lib/Data/AniList/media.ts | 6 | ||||
| -rw-r--r-- | src/lib/List/Anime/CompletedAnimeList.svelte | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Data/AniList/cacheHydration.ts b/src/lib/Data/AniList/cacheHydration.ts index 434d2a82..61cb1e60 100644 --- a/src/lib/Data/AniList/cacheHydration.ts +++ b/src/lib/Data/AniList/cacheHydration.ts @@ -5,6 +5,7 @@ import manga from "$stores/manga"; import localforage from "localforage"; type MediaCacheKind = "anime" | "manga"; +const cacheStorageKey = (kind: MediaCacheKind) => `${kind}:v3`; interface StoredLastPruneTimes { anime: number; @@ -32,7 +33,7 @@ export const hydrateMediaListCache = (kind: MediaCacheKind) => { const promise = (async () => { const [cache, pruneTimes] = await Promise.all([ - localforage.getItem<string>(kind), + localforage.getItem<string>(cacheStorageKey(kind)), localforage.getItem<StoredLastPruneTimes>("lastPruneTimes"), ]); diff --git a/src/lib/Data/AniList/media.ts b/src/lib/Data/AniList/media.ts index 211174e0..099d4182 100644 --- a/src/lib/Data/AniList/media.ts +++ b/src/lib/Data/AniList/media.ts @@ -212,7 +212,7 @@ interface CollectionOptions { const assignDefaultOptions = (options: CollectionOptions) => { const nonNullOptions: CollectionOptions = { - includeCompleted: true, + includeCompleted: false, forcePrune: false, all: false, addNotification: undefined, @@ -251,10 +251,10 @@ const collectionKey = ( }); const usesSharedMediaStore = (options: CollectionOptions) => - !!options.includeCompleted && !options.all && !options.includeRelations; + !options.includeCompleted && !options.all && !options.includeRelations; const cacheStorageKey = (type: Type, options: CollectionOptions) => { - const baseKey = type === Type.Anime ? "anime" : "manga"; + const baseKey = type === Type.Anime ? "anime:v3" : "manga:v3"; if (usesSharedMediaStore(options)) return baseKey; diff --git a/src/lib/List/Anime/CompletedAnimeList.svelte b/src/lib/List/Anime/CompletedAnimeList.svelte index ec9955b3..9c58a311 100644 --- a/src/lib/List/Anime/CompletedAnimeList.svelte +++ b/src/lib/List/Anime/CompletedAnimeList.svelte @@ -74,7 +74,6 @@ onMount(async () => { $anime, $lastPruneTimes.anime, { - includeCompleted: true, addNotification, }, ); |