aboutsummaryrefslogtreecommitdiff
path: root/src/lib/AniList
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/AniList')
-rw-r--r--src/lib/AniList/media.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/AniList/media.ts b/src/lib/AniList/media.ts
index 034fccfd..ebf8c72f 100644
--- a/src/lib/AniList/media.ts
+++ b/src/lib/AniList/media.ts
@@ -2,9 +2,8 @@ import type { AniListAuthorisation } from '$lib/AniList/identity';
import type { UserIdentity } from './identity';
import anime from '../../stores/anime';
import manga from '../../stores/manga';
-import mangaLastPrune from '../../stores/mangaLastPrune';
-import animeLastPrune from '../../stores/animeLastPrune';
import settings from '../../stores/settings';
+import lastPruneTimes from '../../stores/lastPruneTimes';
export enum Type {
Anime,
@@ -69,9 +68,9 @@ export const mediaListCollection = async (
if (String(currentLastPruneAt) == '') {
if (type === Type.Anime) {
- animeLastPrune.set(new Date().getTime().toString());
+ lastPruneTimes.setKey('anime', new Date().getTime().toString());
} else {
- mangaLastPrune.set(new Date().getTime().toString());
+ lastPruneTimes.setKey('manga', new Date().getTime().toString());
}
} else {
if (
@@ -80,10 +79,10 @@ export const mediaListCollection = async (
forcePrune
) {
if (type === Type.Anime) {
- animeLastPrune.set(new Date().getTime().toString());
+ lastPruneTimes.setKey('anime', new Date().getTime().toString());
anime.set('');
} else {
- mangaLastPrune.set(new Date().getTime().toString());
+ lastPruneTimes.setKey('manga', new Date().getTime().toString());
manga.set('');
}