Skip to content

Commit

Permalink
Adding Cancel Button
Browse files Browse the repository at this point in the history
Adding Cancel Button in Compressing Status Message!

Requested By @MrBotDeveloper
Reviewed By @AbirHasan2005
  • Loading branch information
AbirHasan2005 authored Mar 13, 2021
1 parent 2077a73 commit b681a2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot/helper_funcs/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def convert_video(video_file, output_directory, total_time, bot, message,
"-i",
video_file,
"-c:v",
"libx264",
"h264",
"-preset",
"ultrafast",
"-tune",
Expand Down Expand Up @@ -94,7 +94,7 @@ async def convert_video(video_file, output_directory, total_time, bot, message,
isDone = False
while process.returncode != 0:
await asyncio.sleep(3)
with open("/app/DOWNLOADS/progress.txt",'r+') as file:
with open(DOWNLOAD_LOCATION + "/progress.txt", 'r+') as file:
text = file.read()
frame = re.findall("frame=(\d+)", text)
time_in_us=re.findall("out_time_ms=(\d+)", text)
Expand Down Expand Up @@ -138,7 +138,7 @@ async def convert_video(video_file, output_directory, total_time, bot, message,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton('❌ Cancel ❌', callback_data='fuckingdo')
InlineKeyboardButton('❌ Cancel ❌', callback_data='fuckingdo') # Nice Call 🤭
]
]
)
Expand Down

0 comments on commit b681a2a

Please sign in to comment.