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

@@ -383,7 +383,7 @@ export type MangaNodeListFieldPolicy = {
pageInfo?: FieldPolicy<any> | FieldReadFunction<any>,
totalCount?: FieldPolicy<any> | FieldReadFunction<any>
};
export type MangaTypeKeySpecifier = ('age' | 'artist' | 'author' | 'categories' | 'chapters' | 'chaptersAge' | 'chaptersLastFetchedAt' | 'description' | 'downloadCount' | 'genre' | 'id' | 'inLibrary' | 'inLibraryAt' | 'initialized' | 'lastFetchedAt' | 'lastReadChapter' | 'latestFetchedChapter' | 'latestReadChapter' | 'latestUploadedChapter' | 'meta' | 'realUrl' | 'source' | 'sourceId' | 'status' | 'thumbnailUrl' | 'thumbnailUrlLastFetched' | 'title' | 'trackRecords' | 'unreadCount' | 'updateStrategy' | 'url' | MangaTypeKeySpecifier)[];
export type MangaTypeKeySpecifier = ('age' | 'artist' | 'author' | 'categories' | 'chapters' | 'chaptersAge' | 'chaptersLastFetchedAt' | 'description' | 'downloadCount' | 'firstUnreadChapter' | 'genre' | 'id' | 'inLibrary' | 'inLibraryAt' | 'initialized' | 'lastFetchedAt' | 'lastReadChapter' | 'latestFetchedChapter' | 'latestReadChapter' | 'latestUploadedChapter' | 'meta' | 'realUrl' | 'source' | 'sourceId' | 'status' | 'thumbnailUrl' | 'thumbnailUrlLastFetched' | 'title' | 'trackRecords' | 'unreadCount' | 'updateStrategy' | 'url' | MangaTypeKeySpecifier)[];
export type MangaTypeFieldPolicy = {
age?: FieldPolicy<any> | FieldReadFunction<any>,
artist?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -394,6 +394,7 @@ export type MangaTypeFieldPolicy = {
chaptersLastFetchedAt?: FieldPolicy<any> | FieldReadFunction<any>,
description?: FieldPolicy<any> | FieldReadFunction<any>,
downloadCount?: FieldPolicy<any> | FieldReadFunction<any>,
firstUnreadChapter?: FieldPolicy<any> | FieldReadFunction<any>,
genre?: FieldPolicy<any> | FieldReadFunction<any>,
id?: FieldPolicy<any> | FieldReadFunction<any>,
inLibrary?: FieldPolicy<any> | FieldReadFunction<any>,

View File

@@ -938,6 +938,7 @@ export type MangaType = {
chaptersLastFetchedAt?: Maybe<Scalars['LongString']['output']>;
description?: Maybe<Scalars['String']['output']>;
downloadCount: Scalars['Int']['output'];
firstUnreadChapter?: Maybe<ChapterType>;
genre: Array<Scalars['String']['output']>;
id: Scalars['Int']['output'];
inLibrary: Scalars['Boolean']['output'];
@@ -3057,7 +3058,7 @@ export type GetMangaQuery = { __typename?: 'Query', manga: { __typename?: 'Manga
export type GetMangaToMigrateQueryVariables = Exact<{
id: Scalars['Int']['input'];
migrateChapters: Scalars['Boolean']['input'];
getChapterData: Scalars['Boolean']['input'];
migrateCategories: Scalars['Boolean']['input'];
}>;

View File

@@ -22,12 +22,12 @@ export const GET_MANGA = gql`
// returns the current manga from the database
export const GET_MANGA_TO_MIGRATE = gql`
query GET_MANGA_TO_MIGRATE($id: Int!, $migrateChapters: Boolean!, $migrateCategories: Boolean!) {
query GET_MANGA_TO_MIGRATE($id: Int!, $getChapterData: Boolean!, $migrateCategories: Boolean!) {
manga(id: $id) {
id
inLibrary
title
chapters @include(if: $migrateChapters) {
chapters @include(if: $getChapterData) {
nodes {
id
manga {