From 3193c30340a695af0dfb9a700b3f5e6be9679a8e Mon Sep 17 00:00:00 2001 From: juanjo Date: Sun, 6 Sep 2026 18:01:59 +0200 Subject: [PATCH] 06-sep: [menu] Bajar solo si hay torrents; volver limpia bajar --- vigilancia/menu_idd.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vigilancia/menu_idd.py b/vigilancia/menu_idd.py index 2d799f1..bdd8c35 100644 --- a/vigilancia/menu_idd.py +++ b/vigilancia/menu_idd.py @@ -94,6 +94,10 @@ def teclado_videoclub(chat_id): if titulos: filas.append([ _btn("🧲 Torrents…", PREFIJO + "sub:torrents"), + ]) + torrents = _txt("ultimos_torrents", chat_id) + if torrents and torrents.get("torrents"): + filas.append([ _btn("⬇️ Bajar…", PREFIJO + "sub:bajar"), ]) filas.append(FILA_VOLVER) @@ -519,6 +523,13 @@ def _teclado_categoria(chat_id, categoria): def _abrir_categoria(chat_id, message_id, categoria): + if categoria == "videoclub": + # Al volver atras se olvida la eleccion de torrents (se queda Torrents). + try: + import pi_bot + pi_bot.ultimos_torrents.pop(chat_id, None) + except Exception: + pass _record_cat(chat_id, categoria) teclado = _teclado_categoria(chat_id, categoria) if teclado is None: