(self)
| 551 | await self.status_task |
| 552 | |
| 553 | def cancel(self): |
| 554 | log.info(f"Cancelling download: {self.info.title}") |
| 555 | if self.running(): |
| 556 | try: |
| 557 | self.proc.kill() |
| 558 | except Exception as e: |
| 559 | log.error(f"Error killing process for {self.info.title}: {e}") |
| 560 | self.canceled = True |
| 561 | if self.status_queue is not None: |
| 562 | self.status_queue.put(None) |
| 563 | |
| 564 | def close(self): |
| 565 | log.info(f"Closing download process for: {self.info.title}") |