Add a tentative fix
This commit is contained in:
16
main.py
16
main.py
@@ -64,16 +64,16 @@ async def handle_menu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> Non
|
|||||||
await query.edit_message_text("Choose an option:", reply_markup=main_menu_keyboard())
|
await query.edit_message_text("Choose an option:", reply_markup=main_menu_keyboard())
|
||||||
|
|
||||||
case 'status_downloading':
|
case 'status_downloading':
|
||||||
torrent_api = context.bot_data.get("torrent_api", {})
|
t_api = context.bot_data.get("torrent_api", {})
|
||||||
torrents = torrent_api.get_filtered_torrents("downloading")
|
torrents = t_api.get_filtered_torrents("downloading")
|
||||||
|
|
||||||
text = format_torrents(torrents)
|
text = format_torrents(torrents)
|
||||||
|
|
||||||
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
|
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
|
||||||
|
|
||||||
case 'status_active':
|
case 'status_active':
|
||||||
torrent_api = context.bot_data.get("torrent_api", {})
|
t_api = context.bot_data.get("torrent_api", {})
|
||||||
torrents = torrent_api.get_filtered_torrents("active")
|
torrents = t_api.get_filtered_torrents("active")
|
||||||
|
|
||||||
text = format_torrents(torrents)
|
text = format_torrents(torrents)
|
||||||
|
|
||||||
@@ -81,16 +81,16 @@ async def handle_menu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> Non
|
|||||||
|
|
||||||
|
|
||||||
case 'status_all':
|
case 'status_all':
|
||||||
torrent_api = context.bot_data.get("torrent_api", {})
|
t_api = context.bot_data.get("torrent_api", {})
|
||||||
torrents = torrent_api.get_filtered_torrents("all")
|
torrents = t__api.get_filtered_torrents("all")
|
||||||
|
|
||||||
text = format_torrents(torrents)
|
text = format_torrents(torrents)
|
||||||
|
|
||||||
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
|
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
|
||||||
|
|
||||||
case 'menu_status':
|
case 'menu_status':
|
||||||
kuma_api = context.bot_data.get("kuma_api", {})
|
k_api = context.bot_data.get("kuma_api", {})
|
||||||
monitors = kuma_api.get_status()
|
monitors = k_api.get_status()
|
||||||
|
|
||||||
up_text, down_text, paused_text = "", "", ""
|
up_text, down_text, paused_text = "", "", ""
|
||||||
for _, monitor in monitors.items():
|
for _, monitor in monitors.items():
|
||||||
|
|||||||
Reference in New Issue
Block a user