Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed Jan 21, 2024
1 parent fa65d1f commit 7020b81
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions bot/modules/force_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,29 @@ async def remove_from_queue(_, message):
return
obj = task.task()
listener = obj.listener
if status == "fu":
listener.forceUpload = True
if listener.mid in queued_up:
async with queue_dict_lock:
msg = ""
async with queue_dict_lock:
if status == "fu":
listener.forceUpload = True
if listener.mid in queued_up:
await start_up_from_queued(listener.mid)
await sendMessage(message, "Task have been force started!")
elif status == "fd":
listener.forceDownload = True
if listener.mid in queued_dl:
async with queue_dict_lock:
msg = "Task have been force started to upload!"
elif status == "fd":
listener.forceDownload = True
if listener.mid in queued_dl:
await start_dl_from_queued(listener.mid)
await sendMessage(message, "Task have been force started to download only!")
else:
listener.forceDownload = True
listener.forceUpload = True
if listener.mid in queued_up:
async with queue_dict_lock:
msg = "Task have been force started to download only!"
else:
listener.forceDownload = True
listener.forceUpload = True
if listener.mid in queued_up:
await start_up_from_queued(listener.mid)
await sendMessage(message, "Task have been force started to upload!")
elif listener.mid in queued_dl:
async with queue_dict_lock:
msg = "Task have been force started to upload!"
elif listener.mid in queued_dl:
await start_dl_from_queued(listener.mid)
await sendMessage(
message,
"Task have been force started to download and upload will start once download finish!",
)

msg = "Task have been force started to download and upload will start once download finish!"
if msg:
await sendMessage(message, msg)


bot.add_handler(
Expand Down

0 comments on commit 7020b81

Please sign in to comment.