This commit is contained in:
parent
c40c8294b3
commit
2ee127bce2
1 changed files with 2 additions and 2 deletions
|
@ -485,7 +485,7 @@ class YTDLCog(commands.Cog):
|
|||
await ctx.edit(view=None)
|
||||
try:
|
||||
if audio_only is False:
|
||||
file: Path = next(temp_dir.glob("*." + extracted_info["ext"]))
|
||||
file: Path = next(temp_dir.glob("*." + extracted_info.get("ext", "*")))
|
||||
else:
|
||||
# can be .opus, .m4a, .mp3, .ogg, .oga
|
||||
for _file in temp_dir.iterdir():
|
||||
|
@ -495,7 +495,7 @@ class YTDLCog(commands.Cog):
|
|||
else:
|
||||
raise StopIteration
|
||||
except StopIteration:
|
||||
ext = extracted_info["ext"]
|
||||
ext = extracted_info.get("ext", "*")
|
||||
self.log.warning(
|
||||
"Failed to locate downloaded file. Was supposed to be looking for a file extension of "
|
||||
"%r amongst files %r, however none were found.",
|
||||
|
|
Loading…
Reference in a new issue