From 2c0517e9ae567e6f3e2b373eb19b730411bc7119 Mon Sep 17 00:00:00 2001 From: yasir Date: Thu, 9 Feb 2023 15:16:01 +0700 Subject: [PATCH] gennss link --- misskaty/helper/ssgen_helper.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/misskaty/helper/ssgen_helper.py b/misskaty/helper/ssgen_helper.py index 68ffe7bd..b9be0d5a 100644 --- a/misskaty/helper/ssgen_helper.py +++ b/misskaty/helper/ssgen_helper.py @@ -48,11 +48,11 @@ async def get_dimentions(input_file_link): async def screenshot_flink(c, m): chat_id = m.from_user.id - if c.CURRENT_PROCESSES.get(chat_id, 0) == 1: - return await m.answer('You have reached the maximum parallel processes! Try again after one of them finishes.', show_alert=True) - if not c.CURRENT_PROCESSES.get(chat_id): - c.CURRENT_PROCESSES[chat_id] = 0 - c.CURRENT_PROCESSES[chat_id] += 1 + # if c.CURRENT_PROCESSES.get(chat_id, 0) == 1: + # return await m.answer('You have reached the maximum parallel processes! Try again after one of them finishes.', show_alert=True) + # if not c.CURRENT_PROCESSES.get(chat_id): + # c.CURRENT_PROCESSES[chat_id] = 0 + # c.CURRENT_PROCESSES[chat_id] += 1 _, num_screenshots = m.data.split('+') num_screenshots = int(num_screenshots) @@ -60,7 +60,7 @@ async def screenshot_flink(c, m): #print(media_msg) if media_msg.empty: await editPesan(m, 'Why did you delete the file 😠, Now i cannot help you πŸ˜’.') - c.CURRENT_PROCESSES[chat_id] -= 1 + # c.CURRENT_PROCESSES[chat_id] -= 1 return uid = str(uuid.uuid4()) @@ -78,7 +78,7 @@ async def screenshot_flink(c, m): duration = await get_duration(file_link) if isinstance(duration, str): await editPesan(m, "Oops, What's that? Couldn't Open the file😟.") - c.CURRENT_PROCESSES[chat_id] -= 1 + # c.CURRENT_PROCESSES[chat_id] -= 1 return reduced_sec = duration - int(duration*2 / 100) @@ -108,7 +108,7 @@ async def screenshot_flink(c, m): #print(screenshots) if not screenshots: await editPesan(m, '😟 Sorry! Screenshot generation failed possibly due to some infrastructure failure πŸ˜₯.') - c.CURRENT_PROCESSES[chat_id] -= 1 + # c.CURRENT_PROCESSES[chat_id] -= 1 return await editPesan(m, f'πŸ€“ Its done , Now starting to upload!') @@ -116,12 +116,12 @@ async def screenshot_flink(c, m): await media_msg.reply_media_group(screenshots, True) await editPesan(m, f'Completed in {datetime.timedelta(seconds=int(time.time()-start_time))}\n\nJoin @moviesonlydiscussion\n\n©️ @prgofficial') - c.CURRENT_PROCESSES[chat_id] -= 1 + # c.CURRENT_PROCESSES[chat_id] -= 1 except: aa = traceback.print_exc() await editPesan(m, '😟 Sorry! Screenshot generation failed, ERR: {aa} πŸ˜₯.') - c.CURRENT_PROCESSES[chat_id] -= 1 + # c.CURRENT_PROCESSES[chat_id] -= 1 def gen_ik_buttons(): btns = []