From fd3751e84ff00b289947036df94ed5923a7bab3e Mon Sep 17 00:00:00 2001
From: robonau <30987265+Robonau@users.noreply.github.com>
Date: Fri, 15 Mar 2024 21:13:38 +0000
Subject: [PATCH 1/2] version mapping
---
versionToServerVersionMapping.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/versionToServerVersionMapping.json b/versionToServerVersionMapping.json
index 7979c8d0..2af4bb17 100644
--- a/versionToServerVersionMapping.json
+++ b/versionToServerVersionMapping.json
@@ -5,7 +5,7 @@
},
{
"tag": "v1.0.0",
- "uiVersion": "r601",
+ "uiVersion": "r605",
"serverVersion": "r1498"
}
]
From 4a4c4fb9fb414115a36e966ba64e58ad07cca526 Mon Sep 17 00:00:00 2001
From: robonau <30987265+Robonau@users.noreply.github.com>
Date: Sat, 16 Mar 2024 15:26:18 +0000
Subject: [PATCH 2/2] migrate can Delete old Downloaded chapters
---
.../manga/[MangaID]/migrateModal.svelte | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/routes/(app)/browse/migrate/manga/[MangaID]/migrateModal.svelte b/src/routes/(app)/browse/migrate/manga/[MangaID]/migrateModal.svelte
index 6a6a8b6d..1ca84738 100644
--- a/src/routes/(app)/browse/migrate/manga/[MangaID]/migrateModal.svelte
+++ b/src/routes/(app)/browse/migrate/manga/[MangaID]/migrateModal.svelte
@@ -11,6 +11,7 @@
import Slide from '$lib/components/Slide.svelte';
import {
bindTrack,
+ deleteDownloadedChapters,
fetchChaptersMigration,
updateChapters,
updateMangaCategories,
@@ -22,6 +23,7 @@
import { getContextClient } from '@urql/svelte';
import { type ResultOf } from '$lib/gql/graphql';
import type { SvelteComponent } from 'svelte';
+ import { ErrorHelp } from '$lib/util';
const modalStore = getModalStore();
export let parent: SvelteComponent;
@@ -32,6 +34,7 @@
let doChapters = true;
let doCategories = true;
let doTracking = true;
+ let deleteDownloaded = manga.downloadCount > 0 ? true : false;
let MigrateLoading = false;
let CopyLoading = false;
@@ -76,9 +79,24 @@
if (doTracking) {
ToDo.push(CopyMangaTracking());
}
+ if (deleteDownloaded) {
+ ToDo.push(deleteDownloadedMangas());
+ }
await Promise.all(ToDo);
}
+ async function deleteDownloadedMangas() {
+ const ids = manga.chapters.nodes.map((e) => e.id);
+ await ErrorHelp(
+ 'failed to delete Downloaded chapters',
+ client
+ .mutation(deleteDownloadedChapters, {
+ ids
+ })
+ .toPromise()
+ );
+ }
+
async function CopyMangaChapters() {
const newChapters = await client
.mutation(fetchChaptersMigration, { id })
@@ -167,6 +185,14 @@
>
Tracking
+ {#if manga.downloadCount > 0}
+