Fix a failed download leaving temp file.
This commit is contained in:
parent
1b6b3aa9c8
commit
49590dcc6c
1 changed files with 2 additions and 0 deletions
|
@ -276,6 +276,8 @@ class MyRadioAPI:
|
|||
request = await self.async_api_call(url, api_version="non")
|
||||
|
||||
if not request or not isinstance(request, (bytes, bytearray)):
|
||||
# Remove the .downloading temp file given we gave up trying to download.
|
||||
os.remove(filename + dl_suffix)
|
||||
return (None, False) if did_download else None
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue