From 63a829ddcabc8d1428389ffe2ce1d8ba01ecc2db Mon Sep 17 00:00:00 2001 From: Youwes09 Date: Thu, 23 Apr 2026 10:52:15 -0500 Subject: [PATCH] Fix: Chapter Nodes in LibraryUpdater --- Todo | 25 +++++----------------- src/features/library/lib/libraryUpdater.ts | 16 +++++++++----- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/Todo b/Todo index 29f4bfa..bb39f58 100644 --- a/Todo +++ b/Todo @@ -1,5 +1,9 @@ Major Revisions: - Moku-Share to Easily Migrate/Share Manga (Investigate Usecase/Feasibility) + - Moku-Share allows exporting of Manga + - Compressed Format (Storage) + - Import as Local-Source + - Takes existing Local-Source or Creates Own Minor Revisions: - Investigate feasibility of Multi-Page Screenshot (Reader) @@ -22,25 +26,9 @@ In-Progress: - Add Flathub Support (Pending Video) - QOL Animations & Revamps - - Extensions QOL Animations - - Folders Slide - - Dropdown Formatting (Repositories, Etc) - - Extensions Revamps - - Fix Pill-Shaped Language Filter - - Fix ALL ALL EN Tag Issue - - Search QOL Animations - - Languages Dropdown Animations - - Search Revamps - - Custom Language Selector Modal - - Change Tab Selector to match Extensions & Library Folders (Design) - - Filter Genre should Filter Tags as well - Tracking Revamp - Completely Revamp Tracking - - Fix ALl Folder Tabs (Works in Dev, not Prod) (TESTING) - - Extensions - - Library - - Search - Fix Tracking Login - Pasting OAuth URL is not User-Friendly, Look for Alternatives @@ -52,7 +40,4 @@ In-Progress: - Icon appears to have Green Underglow? -Testing Bugs: - - Reader Zoom does not work (Dropdown Slider, Value Adjustment); Goes to NaN - - Fix Library Folders (Uneven Padding + Bleed into Other Folders); Appears Constraints are Off - - \ No newline at end of file +Testing Bugs: \ No newline at end of file diff --git a/src/features/library/lib/libraryUpdater.ts b/src/features/library/lib/libraryUpdater.ts index e2de95e..9a2f9d0 100644 --- a/src/features/library/lib/libraryUpdater.ts +++ b/src/features/library/lib/libraryUpdater.ts @@ -4,8 +4,8 @@ import { UPDATE_LIBRARY } from "@api/mutations/manga"; import { GET_RECENTLY_UPDATED } from "@api/queries/chapters"; import type { LibraryUpdateEntry } from "@store/state.svelte"; -const POLL_INTERVAL_MS = 3000; -const POLL_INITIAL_MS = 2000; +const POLL_INTERVAL_MS = 3000; +const POLL_INITIAL_MS = 2000; export interface UpdateProgress { finished: number; @@ -64,7 +64,13 @@ export function startLibraryUpdate(callbacks: LibraryUpdaterCallbacks): () => vo if (!jobsInfo.isRunning && seenWork) { const recent = await gql<{ - chapters: { nodes: { mangaId: number; mangaTitle: string; thumbnailUrl: string; fetchedAt: string }[] } + chapters: { + nodes: { + mangaId: number; + fetchedAt: string; + manga: { id: number; title: string; thumbnailUrl: string; inLibrary: boolean }; + }[] + } }>(GET_RECENTLY_UPDATED, {}).catch(() => ({ chapters: { nodes: [] } })); if (cancelled) return; @@ -79,8 +85,8 @@ export function startLibraryUpdate(callbacks: LibraryUpdaterCallbacks): () => vo } else { byManga.set(ch.mangaId, { mangaId: ch.mangaId, - mangaTitle: ch.mangaTitle, - thumbnailUrl: ch.thumbnailUrl, + mangaTitle: ch.manga.title, + thumbnailUrl: ch.manga.thumbnailUrl, newChapters: 1, checkedAt: Date.now(), });