Prevent crash on missing filename (status.get)

This commit is contained in:
vkartk 2024-01-26 14:04:47 +05:30
parent feec0c56b4
commit f9a2a697df

View file

@ -139,7 +139,7 @@ class Download:
return
self.tmpfilename = status.get('tmpfilename')
if 'filename' in status:
fileName = status['filename']
fileName = status.get('filename')
self.info.filename = os.path.relpath(fileName, self.download_dir)
self.info.size = os.path.getsize(fileName) if os.path.exists(fileName) else None