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)
|
await ctx.edit(view=None)
|
||||||
try:
|
try:
|
||||||
if audio_only is False:
|
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:
|
else:
|
||||||
# can be .opus, .m4a, .mp3, .ogg, .oga
|
# can be .opus, .m4a, .mp3, .ogg, .oga
|
||||||
for _file in temp_dir.iterdir():
|
for _file in temp_dir.iterdir():
|
||||||
|
@ -495,7 +495,7 @@ class YTDLCog(commands.Cog):
|
||||||
else:
|
else:
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
ext = extracted_info["ext"]
|
ext = extracted_info.get("ext", "*")
|
||||||
self.log.warning(
|
self.log.warning(
|
||||||
"Failed to locate downloaded file. Was supposed to be looking for a file extension of "
|
"Failed to locate downloaded file. Was supposed to be looking for a file extension of "
|
||||||
"%r amongst files %r, however none were found.",
|
"%r amongst files %r, however none were found.",
|
||||||
|
|
Loading…
Reference in a new issue