Implement JuneProtection™️
This commit is contained in:
parent
faed38aafc
commit
034e8cef66
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,7 @@ class YoutubeDLModule(niobot.Module):
|
||||||
"merge_output_format": "webm/mp4/mov/m4a/oga/ogg/mp3/mka/mkv",
|
"merge_output_format": "webm/mp4/mov/m4a/oga/ogg/mp3/mka/mkv",
|
||||||
"source_address": "0.0.0.0",
|
"source_address": "0.0.0.0",
|
||||||
"concurrent_fragment_downloads": 4,
|
"concurrent_fragment_downloads": 4,
|
||||||
|
"max_filesize": "600M"
|
||||||
}
|
}
|
||||||
|
|
||||||
async def convert_to_m4a(self, file: Path) -> Path:
|
async def convert_to_m4a(self, file: Path) -> Path:
|
||||||
|
@ -249,6 +250,9 @@ class YoutubeDLModule(niobot.Module):
|
||||||
description += "\n"
|
description += "\n"
|
||||||
description += "\n".join(lines)
|
description += "\n".join(lines)
|
||||||
|
|
||||||
|
if filesize and filesize >= 500 * 1000:
|
||||||
|
return await response.edit("Sorry, could not find a format small enough.")
|
||||||
|
|
||||||
await response.edit(
|
await response.edit(
|
||||||
f"# {title}\n\n{description}\n\nProgress: `0% [..........]`\n\nDownloading (step 2/10)"
|
f"# {title}\n\n{description}\n\nProgress: `0% [..........]`\n\nDownloading (step 2/10)"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue