Merge pull request #385 from vkartk/fix-cancel-nonstarted-downloads-383
Fix cancellation & deletion for non-started downloads (#383)
This commit is contained in:
commit
06606c7b40
|
|
@ -329,6 +329,10 @@ class DownloadQueue:
|
|||
|
||||
async def cancel(self, ids):
|
||||
for id in ids:
|
||||
if self.pending.exists(id):
|
||||
self.pending.delete(id)
|
||||
await self.notifier.canceled(id)
|
||||
continue
|
||||
if not self.queue.exists(id):
|
||||
log.warn(f'requested cancel for non-existent download {id}')
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue