Feature/download ahead trigger chapter downloads client side (#597)

* Trigger download ahead while reading client side

* Trigger download ahead while reading earlier

Download ahead was only triggered once the chapter got marked as read

* Optionally ignore dupe chapters for download ahead

* Consider current chapters scanlator for dupe check

* Update download ahead related settings

- add new metadata setting for download ahead limit
- previous setting
  - rename
  - update usage (auto download new chapters limit)

* Select chapter to auto delete while reading depending on ignore dupe setting

Currently, the n-th to last chapter always got deleted ignoring if "ignore dupes" setting was enabled or not.

* Only auto delete chapter while reading if it is read

In case not the last read but the n-th to last read chapter should get auto deleted while reading, it currently just got deleted ignoring if it has been read or not.
This commit is contained in:
schroda
2024-02-16 19:16:18 +01:00
committed by GitHub
parent 0edec685f9
commit 2acf2b6d33
10 changed files with 232 additions and 116 deletions

View File

@@ -93,11 +93,8 @@ export const UPDATE_CHAPTER = gql`
$getBookmarked: Boolean!
$getRead: Boolean!
$getLastPageRead: Boolean!
$id: Int!
$chapterIdToDelete: Int!
$deleteChapter: Boolean!
$mangaId: Int!
$downloadAhead: Boolean!
) {
updateChapter(input: $input) {
clientMutationId
@@ -130,9 +127,6 @@ export const UPDATE_CHAPTER = gql`
}
}
}
downloadAhead(input: { mangaIds: [$mangaId], latestReadChapterIds: [$id] }) @include(if: $downloadAhead) {
clientMutationId
}
}
`;
@@ -144,9 +138,6 @@ export const UPDATE_CHAPTERS = gql`
$getLastPageRead: Boolean!
$chapterIdsToDelete: [Int!]!
$deleteChapters: Boolean!
$mangaIds: [Int!]!
$latestReadChapterIds: [Int!]!
$downloadAhead: Boolean!
) {
updateChapters(input: $input) {
clientMutationId
@@ -179,9 +170,5 @@ export const UPDATE_CHAPTERS = gql`
}
}
}
downloadAhead(input: { mangaIds: $mangaIds, latestReadChapterIds: $latestReadChapterIds })
@include(if: $downloadAhead) {
clientMutationId
}
}
`;