From 10649da46d6665e7653c15133c7f2235a0b7e3c0 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sat, 18 Apr 2020 21:21:02 +0200 Subject: [PATCH] =?UTF-8?q?Download:=20Non=20mostrare=20la=20finestra=20di?= =?UTF-8?q?=20selezione=20=20se=20c'=C3=A8=20un=20solo=20server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- specials/downloads.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specials/downloads.py b/specials/downloads.py index efa9eba8..a430a6a5 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -786,7 +786,13 @@ def select_server(item): if not i.server and hasattr(channel, "play"): play_items[x] = getattr(channel, "play")(i) - seleccion = platformtools.dialog_select(config.get_localized_string(70192), ["Auto"] + [s.title for s in play_items]) + if len(play_items) == 1: + # if there is only one server select it + seleccion = 1 + else: + # altrimenti mostra la finestra di selezione + seleccion = platformtools.dialog_select(config.get_localized_string(70192), ["Auto"] + [s.title for s in play_items]) + if seleccion >= 1: update_json(item.path, { "downloadServer": {"url": play_items[seleccion - 1].url, "server": play_items[seleccion - 1].server}})