diff --git a/app/ytdl.py b/app/ytdl.py index 2738447..d6df963 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -1140,9 +1140,11 @@ class DownloadQueue: if not self.queue.exists(id): log.warning(f'requested cancel for non-existent download {id}') continue - if self.queue.get(id).started(): - self.queue.get(id).cancel() + dl = self.queue.get(id) + if dl.started(): + dl.cancel() else: + dl.canceled = True self.queue.delete(id) await self.notifier.canceled(id) return {'status': 'ok'} diff --git a/ui/src/app/app.html b/ui/src/app/app.html index 9ec0472..2b294fd 100644 --- a/ui/src/app/app.html +++ b/ui/src/app/app.html @@ -608,6 +608,17 @@ @if (batchImportStatus) { {{ batchImportStatus }} } + @if (importInProgress) { +
+
+ {{ batchImportCount }} / {{ batchImportTotal }} +
+
+ }