mirror of
https://github.com/anasty17/mirror-leech-telegram-bot.git
synced 2025-01-08 12:07:33 +08:00
Minor fix
Signed-off-by: anasty17 <e.anastayyar@gmail.com>
This commit is contained in:
parent
a3c6e1a244
commit
af8aa70951
@ -33,7 +33,7 @@ class MirrorStatus:
|
||||
STATUS_CONVERTING = "Convert"
|
||||
|
||||
|
||||
STATUS_DICT = {
|
||||
STATUSES = {
|
||||
"ALL": "All",
|
||||
"DL": MirrorStatus.STATUS_DOWNLOADING,
|
||||
"UP": MirrorStatus.STATUS_UPLOADING,
|
||||
@ -74,7 +74,7 @@ def getSpecificTasks(status, userId):
|
||||
if tk.listener.userId == userId
|
||||
and (st := tk.status() == status)
|
||||
or status == MirrorStatus.STATUS_DOWNLOADING
|
||||
and st not in STATUS_DICT.values()
|
||||
and st not in STATUSES.values()
|
||||
]
|
||||
else:
|
||||
return [
|
||||
@ -82,7 +82,7 @@ def getSpecificTasks(status, userId):
|
||||
for tk in task_dict.values()
|
||||
if (st := tk.status() == status)
|
||||
or status == MirrorStatus.STATUS_DOWNLOADING
|
||||
and st not in STATUS_DICT.values()
|
||||
and st not in STATUSES.values()
|
||||
]
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ async def get_readable_message(sid, is_user, page_no=1, status="All", page_step=
|
||||
for i in [1, 2, 4, 6, 8, 10, 15]:
|
||||
buttons.ibutton(i, f"status {sid} ps {i}", position="footer")
|
||||
if status != "All" or tasks_no > 20:
|
||||
for label, status_value in list(STATUS_DICT.items())[:9]:
|
||||
for label, status_value in list(STATUSES.items())[:9]:
|
||||
if status_value != status:
|
||||
buttons.ibutton(label, f"status {sid} st {status_value}")
|
||||
buttons.ibutton("♻️", f"status {sid} ref", position="header")
|
||||
|
@ -129,7 +129,7 @@ async def get_user_settings(from_user):
|
||||
else:
|
||||
sd_msg = "Disabled"
|
||||
|
||||
upload_paths = "Exists" if user_dict.get("upload_paths", False) else "Not Exists"
|
||||
upload_paths = "Added" if user_dict.get("upload_paths", False) else "None"
|
||||
buttons.ibutton("Upload Paths", f"userset {user_id} upload_paths")
|
||||
|
||||
default_upload = (
|
||||
@ -147,8 +147,8 @@ async def get_user_settings(from_user):
|
||||
else:
|
||||
ex_ex = "None"
|
||||
|
||||
ns_msg = "Exists" if user_dict.get("name_sub", False) else "Not Exists"
|
||||
buttons.ibutton("YT-DLP Options", f"userset {user_id} name_subtitute")
|
||||
ns_msg = "Added" if user_dict.get("name_sub", False) else "None"
|
||||
buttons.ibutton("Name Subtitute", f"userset {user_id} name_subtitute")
|
||||
|
||||
buttons.ibutton("YT-DLP Options", f"userset {user_id} yto")
|
||||
if user_dict.get("yt_opt", False):
|
||||
|
Loading…
Reference in New Issue
Block a user