mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Fix weird bug with filenames
This commit is contained in:
parent
a3cffe1d74
commit
ef896ed3dc
1 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ class Video:
|
|||
if file is None and info is None:
|
||||
self.file = str(hash(url)) + ".opus"
|
||||
elif info is not None:
|
||||
self.file = re.sub(r'[/\\?*"<>|!:]', "_", info["title"]) + ".opus"
|
||||
self.file = "./opusfiles/" + re.sub(r'[/\\?*"<>|!:]', "_", info["title"]) + ".opus"
|
||||
else:
|
||||
self.file = file
|
||||
self.downloaded = False if file is None else True
|
||||
|
@ -190,7 +190,7 @@ class Video:
|
|||
# Check if the file has been downloaded
|
||||
if not self.downloaded:
|
||||
raise FileNotDownloadedError()
|
||||
return discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(f"./opusfiles/{self.file}", **ffmpeg_settings))
|
||||
return discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(f"{self.file}", **ffmpeg_settings))
|
||||
|
||||
|
||||
class SecretVideo(Video):
|
||||
|
|
Loading…
Reference in a new issue