From dd8a351cf25dfe282509f64d630b46e78cd432da Mon Sep 17 00:00:00 2001 From: l1231669 Date: Mon, 28 Aug 2017 20:58:41 +0200 Subject: [PATCH 1/3] add ID to labels to fix show in Mediaserver --- plugin.video.alfa/channels/downloads.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/channels/downloads.json b/plugin.video.alfa/channels/downloads.json index bed761f0..cdd77d11 100755 --- a/plugin.video.alfa/channels/downloads.json +++ b/plugin.video.alfa/channels/downloads.json @@ -24,6 +24,7 @@ ], "settings": [ { + "id": "lab_1", "type": "label", "label": "Ubicacion de archivos", "enabled": true, @@ -54,6 +55,7 @@ "visible": true }, { + "id": "lab_2", "type": "label", "label": "Descarga", "enabled": true, @@ -132,6 +134,7 @@ "visible": true }, { + "id": "lab_3", "type": "label", "label": "Elección del servidor", "enabled": true, @@ -186,4 +189,4 @@ "visible": true } ] -} \ No newline at end of file +} From b9f299d0f0b82cfa8f0b2f2a87626819461f03c8 Mon Sep 17 00:00:00 2001 From: l1231669 Date: Mon, 28 Aug 2017 21:54:32 +0200 Subject: [PATCH 2/3] Rollback downloads.json --- plugin.video.alfa/channels/downloads.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugin.video.alfa/channels/downloads.json b/plugin.video.alfa/channels/downloads.json index cdd77d11..bed761f0 100755 --- a/plugin.video.alfa/channels/downloads.json +++ b/plugin.video.alfa/channels/downloads.json @@ -24,7 +24,6 @@ ], "settings": [ { - "id": "lab_1", "type": "label", "label": "Ubicacion de archivos", "enabled": true, @@ -55,7 +54,6 @@ "visible": true }, { - "id": "lab_2", "type": "label", "label": "Descarga", "enabled": true, @@ -134,7 +132,6 @@ "visible": true }, { - "id": "lab_3", "type": "label", "label": "Elección del servidor", "enabled": true, @@ -189,4 +186,4 @@ "visible": true } ] -} +} \ No newline at end of file From 030694b7b1f76828eb9fb9d047d4a2f29ecaab74 Mon Sep 17 00:00:00 2001 From: l1231669 Date: Mon, 28 Aug 2017 21:54:54 +0200 Subject: [PATCH 3/3] Add code to check ID --- mediaserver/platformcode/controllers/html.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mediaserver/platformcode/controllers/html.py b/mediaserver/platformcode/controllers/html.py index 885a9d0e..0cc5f00b 100644 --- a/mediaserver/platformcode/controllers/html.py +++ b/mediaserver/platformcode/controllers/html.py @@ -677,16 +677,17 @@ class platform(Platformtools): if not "label" in c: continue # Obtenemos el valor - if not c["id"] in dict_values: - if not callback: - c["value"] = config.get_setting(c["id"], **kwargs) + if "id" in c: + if not c["id"] in dict_values: + if not callback: + c["value"] = config.get_setting(c["id"], **kwargs) + else: + c["value"] = c["default"] + + dict_values[c["id"]] = c["value"] + else: - c["value"] = c["default"] - - dict_values[c["id"]] = c["value"] - - else: - c["value"] = dict_values[c["id"]] + c["value"] = dict_values[c["id"]] # Translation if c['label'].startswith('@') and unicode(c['label'][1:]).isnumeric():