mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-08 21:04:50 +00:00
FIx sub format
This commit is contained in:
parent
ce988c8d47
commit
04a3999512
1 changed files with 10 additions and 11 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
"""
|
"""
|
||||||
* @author yasir <yasiramunandar@gmail.com>
|
* @author yasir <yasiramunandar@gmail.com>
|
||||||
* @date 2022-12-01 09:12:27
|
* @date 2022-12-01 09:12:27
|
||||||
* @lastModified 2022-12-01 09:32:31
|
|
||||||
* @projectName MissKatyPyro
|
* @projectName MissKatyPyro
|
||||||
* Copyright @YasirPedia All rights reserved
|
* Copyright @YasirPedia All rights reserved
|
||||||
"""
|
"""
|
||||||
|
|
@ -128,17 +127,17 @@ async def stream_extract(bot, update):
|
||||||
_, map, codec = cb_data.split("_")
|
_, map, codec = cb_data.split("_")
|
||||||
link = update.message.reply_to_message.command[1]
|
link = update.message.reply_to_message.command[1]
|
||||||
await update.message.edit("Processing...")
|
await update.message.edit("Processing...")
|
||||||
if codec == "aac":
|
|
||||||
format = "aac"
|
|
||||||
elif codec == "mp3":
|
|
||||||
format = "mp3"
|
|
||||||
elif codec == "eac3":
|
|
||||||
format = "eac3"
|
|
||||||
elif codec == "subrip":
|
|
||||||
format = "srt"
|
|
||||||
else:
|
|
||||||
format == "ass"
|
|
||||||
try:
|
try:
|
||||||
|
if codec == "aac":
|
||||||
|
format = "aac"
|
||||||
|
elif codec == "mp3":
|
||||||
|
format = "mp3"
|
||||||
|
elif codec == "eac3":
|
||||||
|
format = "eac3"
|
||||||
|
elif codec == "subrip":
|
||||||
|
format = "srt"
|
||||||
|
else:
|
||||||
|
format == "ass"
|
||||||
start_time = perf_counter()
|
start_time = perf_counter()
|
||||||
namafile = get_subname(link, format)
|
namafile = get_subname(link, format)
|
||||||
extract = (await shell_exec(f"mediaextract -i {link} -map 0:{map} {namafile}"))[
|
extract = (await shell_exec(f"mediaextract -i {link} -map 0:{map} {namafile}"))[
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue