Polished download series function

- File and size resets every time when download is triggered
- If everything is downloaded show popup to tell it to user
This commit is contained in:
ISO-B 2024-09-08 00:06:55 +03:00
parent 34dcdc89c3
commit 62e3ca4068
2 changed files with 6 additions and 0 deletions

View file

@ -126,6 +126,8 @@ export default {
// Fetch series data from server
let page = 0
let fetchFinished = false
this.missingFiles = 0
this.missingFilesSize = 0
while (fetchFinished === false) {
fetchFinished = await this.fetchSeriesEntities(page)
page += 1
@ -134,6 +136,9 @@ export default {
console.error('failed to fetch series books data')
return null
}
if (this.missingFiles == 0) {
alert(this.$getString('MessageSeriesAlreadyDownloaded'))
}
// Format message for dialog
let startDownloadMessage = this.$getString('MessageSeriesDownloadConfirmIos', [this.libraryIds.length, this.missingFiles, this.$bytesPretty(this.missingFilesSize)])