mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
debug genss
This commit is contained in:
parent
141dc3ca54
commit
e29552254c
3 changed files with 8 additions and 4 deletions
|
|
@ -6,6 +6,9 @@ from pyrogram.errors import FloodWait
|
|||
from pyrogram.types import InputMediaPhoto
|
||||
|
||||
from misskaty.plugins.dev import shell_exec
|
||||
from logging import getLogger
|
||||
|
||||
LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
def hhmmss(seconds):
|
||||
|
|
@ -13,9 +16,10 @@ def hhmmss(seconds):
|
|||
|
||||
|
||||
async def take_ss(video_file):
|
||||
out_put_file_name = f"genss{str(time.time())}.png"
|
||||
out_put_file_name = f"genss-{str(time.time())}.png"
|
||||
cmd = f"vcsi '{video_file}' -t -w 1340 -g 4x4 --timestamp-font assets/DejaVuSans.ttf --metadata-font assets/DejaVuSans-Bold.ttf --template misskaty/helper/ssgen_template.html --quality 100 --end-delay-percent 20 --metadata-font-size 30 --timestamp-font-size 20 -o {out_put_file_name}"
|
||||
await shell_exec(cmd)
|
||||
r = await shell_exec(cmd)
|
||||
LOGGER.info(r)
|
||||
return out_put_file_name if os.path.lexists(out_put_file_name) else None
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ async def genss(self: Client, ctx: Message, strings):
|
|||
download_file_path = os.path.join("downloads/", file_name)
|
||||
downloader = SmartDL(url, download_file_path, progress_bar=False, timeout=10, verify=False)
|
||||
try:
|
||||
downloader.start(blocking=False, verify=False)
|
||||
downloader.start(blocking=False)
|
||||
except Exception as err:
|
||||
return await pesan.edit(str(err))
|
||||
c_time = time.time()
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ DETAILS
|
|||
)
|
||||
except:
|
||||
try:
|
||||
link = await post_to_telegraph(False, "MissKaty MediaInfo", body_text)
|
||||
link = await post_to_telegraph(False, "MissKaty MediaInfo", f"<code>{body_text}</code>")
|
||||
markup = InlineKeyboardMarkup(
|
||||
[[InlineKeyboardButton(text=strings("viweb"), url=link)]]
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue