fix(youtubedownlaoder): hopefully fixed downloading videos
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 53s
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 53s
This commit is contained in:
parent
b45bddc548
commit
1d666a569c
1 changed files with 2 additions and 2 deletions
|
@ -72,13 +72,13 @@ class YouTubeDownloader(commands.Cog):
|
|||
filename_format = filename + ".m4a"
|
||||
else:
|
||||
stream = yt.streams.filter(progressive=True, mime_type='video/mp4')
|
||||
stream = stream.order_by('res')
|
||||
stream = stream.order_by('resolution')
|
||||
filename_format = filename + ".mp4"
|
||||
if os.path.isfile(path + f"{os.sep}{filename_format}"):
|
||||
previously_existed = True
|
||||
else:
|
||||
previously_existed = False
|
||||
return stream.first().download(filename=filename, output_path=path), previously_existed, filename_format
|
||||
return stream.desc().first().download(filename=filename, output_path=path), previously_existed, filename_format
|
||||
data_path = await self.config.save_directory()
|
||||
if subfolder and await self.bot.is_owner(ctx.author):
|
||||
data_path = os.path.join(data_path, subfolder)
|
||||
|
|
Loading…
Reference in a new issue