Compare commits

..

2 Commits

Author SHA1 Message Date
e7c8791f43 Merge branch 'main' of https://gitea.abzk.fr/MrZaiko/Jarvis
All checks were successful
Build and Deploy / build (push) Successful in 2m9s
2025-04-08 12:43:21 +02:00
42b14c406a Add a tentative fix 2025-04-08 12:42:51 +02:00

16
main.py
View File

@@ -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())
case 'status_downloading':
torrent_api = context.bot_data.get("torrent_api", {})
torrents = torrent_api.get_filtered_torrents("downloading")
t_api = context.bot_data.get("torrent_api", {})
torrents = t_api.get_filtered_torrents("downloading")
text = format_torrents(torrents)
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
case 'status_active':
torrent_api = context.bot_data.get("torrent_api", {})
torrents = torrent_api.get_filtered_torrents("active")
t_api = context.bot_data.get("torrent_api", {})
torrents = t_api.get_filtered_torrents("active")
text = format_torrents(torrents)
@@ -81,16 +81,16 @@ async def handle_menu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> Non
case 'status_all':
torrent_api = context.bot_data.get("torrent_api", {})
torrents = torrent_api.get_filtered_torrents("all")
t_api = context.bot_data.get("torrent_api", {})
torrents = t__api.get_filtered_torrents("all")
text = format_torrents(torrents)
await query.edit_message_text(text, reply_markup=torrents_menu_keyboard())
case 'menu_status':
kuma_api = context.bot_data.get("kuma_api", {})
monitors = kuma_api.get_status()
k_api = context.bot_data.get("kuma_api", {})
monitors = k_api.get_status()
up_text, down_text, paused_text = "", "", ""
for _, monitor in monitors.items():