From 5b4a6e6d9f6652c597e7e95eef547f0bc180f558 Mon Sep 17 00:00:00 2001 From: derrod Date: Thu, 6 Aug 2020 09:28:25 +0200 Subject: [PATCH] [downloader] Fix temporary file name in result handler --- legendary/downloader/manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legendary/downloader/manager.py b/legendary/downloader/manager.py index 6d41c6b..816307b 100644 --- a/legendary/downloader/manager.py +++ b/legendary/downloader/manager.py @@ -524,6 +524,9 @@ class DLManager(Process): self.num_tasks_processed_since_last += 1 if res.closed and self.resume_file and res.success: + if res.filename.endswith('.tmp'): + res.filename = res.filename[:-4] + file_hash = self.hash_map[res.filename] # write last completed file to super simple resume file with open(self.resume_file, 'ab') as rf: