Add option to delete downloaded chapters on migration (#655)

This commit is contained in:
schroda
2024-03-16 13:45:54 +01:00
committed by GitHub
parent 31d53ed182
commit 318c4a5040
7 changed files with 29 additions and 7 deletions

View File

@@ -1451,17 +1451,19 @@ export class RequestManager {
{
migrateChapters = false,
migrateCategories = false,
deleteChapters = false,
apolloOptions: options,
}: {
migrateChapters?: boolean;
migrateCategories?: boolean;
deleteChapters?: boolean;
apolloOptions?: QueryOptions<GetMangaToMigrateQueryVariables, GetMangaToMigrateQuery>;
} = {},
): AbortabaleApolloQueryResponse<GetMangaToMigrateQuery> {
return this.doRequest(
GQLMethod.QUERY,
GET_MANGA_TO_MIGRATE,
{ id: Number(mangaId), migrateChapters, migrateCategories },
{ id: Number(mangaId), getChapterData: migrateChapters || deleteChapters, migrateCategories },
options,
);
}