aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-28 09:04:14 +0000
committerFuwn <[email protected]>2026-03-28 09:04:14 +0000
commitebd08256f7c4b754e75eab02c110b689278e197f (patch)
treed6a198ebeef943f58cf109ab7721a5a4b9769552 /src/lib
parentfix(state): restore persisted list UI state (diff)
downloaddue.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.ts3
-rw-r--r--src/lib/Data/AniList/media.ts6
-rw-r--r--src/lib/List/Anime/CompletedAnimeList.svelte1
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,
},
);