Use new "fetchMangaAndChapters" mutation

This commit is contained in:
schroda
2026-06-30 15:33:57 +02:00
parent ef0dbef9cd
commit aa6ededa10
9 changed files with 79 additions and 234 deletions

View File

@@ -159,8 +159,8 @@ export class MangaMigration {
await MangaMigration.migrate(
mangaToMigrateData?.manga,
mangaToMigrateToData?.fetchManga?.manga,
mangaToMigrateToData?.fetchChapters?.chapters,
mangaToMigrateToData?.fetchMangaAndChapters?.manga,
mangaToMigrateToData?.fetchMangaAndChapters?.chapters,
options,
removeMangaFromCategories,
);

View File

@@ -166,7 +166,7 @@ export type TMigratableSource = NonNullable<GetMigratableSourcesQuery['mangas'][
export type MangaToMigrate = NonNullable<GetMangaToMigrateQuery['manga']>;
export type MangaToMigrateTo = NonNullable<GetMangaToMigrateToFetchMutation['fetchManga']>['manga'];
export type MangaToMigrateTo = NonNullable<GetMangaToMigrateToFetchMutation['fetchMangaAndChapters']>['manga'];
export type MigrationChapter = ChapterIdInfo &
ChapterReadInfo &

View File

@@ -861,10 +861,10 @@ export class MigrationManager {
}).response,
);
if (updatedMatch.data?.fetchManga?.manga) {
if (updatedMatch.data?.fetchMangaAndChapters?.manga) {
return {
manga: updatedMatch.data.fetchManga.manga,
chapters: updatedMatch.data.fetchChapters?.chapters ?? null,
manga: updatedMatch.data.fetchMangaAndChapters.manga,
chapters: updatedMatch.data.fetchMangaAndChapters?.chapters ?? null,
};
}
} catch (e) {