mirror of
https://github.com/alexta69/metube.git
synced 2025-04-04 20:57:45 +03:00
Prevent crash on missing filename (status.get)
This commit is contained in:
parent
feec0c56b4
commit
f9a2a697df
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ class Download:
|
||||||
return
|
return
|
||||||
self.tmpfilename = status.get('tmpfilename')
|
self.tmpfilename = status.get('tmpfilename')
|
||||||
if 'filename' in status:
|
if 'filename' in status:
|
||||||
fileName = status['filename']
|
fileName = status.get('filename')
|
||||||
self.info.filename = os.path.relpath(fileName, self.download_dir)
|
self.info.filename = os.path.relpath(fileName, self.download_dir)
|
||||||
self.info.size = os.path.getsize(fileName) if os.path.exists(fileName) else None
|
self.info.size = os.path.getsize(fileName) if os.path.exists(fileName) else None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue