diff --git a/app/ytdl.py b/app/ytdl.py index 2c52f72..2f5f560 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -300,7 +300,10 @@ class DownloadQueue: continue if self.config.DELETE_FILE_ON_TRASHCAN: dl = self.done.get(id) - os.remove(os.path.join(dl.download_dir, dl.info.filename)) + try: + os.remove(os.path.join(dl.download_dir, dl.info.filename)) + except Exception as e: + log.warn(f'deleting file for download {id} failed with error message {e}') self.done.delete(id) await self.notifier.cleared(id) return {'status': 'ok'}