Fix cancelling non-started downloads (#383)

This commit is contained in:
vkartk 2024-01-26 11:06:54 +05:30
parent feec0c56b4
commit 9e9112f7ef

View file

@ -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