From 0959ff5b7cdf3b592eaa9978b84d2b86c911a3b7 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 31 Jul 2020 17:54:10 +0200 Subject: [PATCH] =?UTF-8?q?Ordine=20di=20default=20per=20novit=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- specials/news.json | 11 ++++------- specials/news.py | 5 +++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/specials/news.json b/specials/news.json index 5c5e7f87..8aa732a7 100644 --- a/specials/news.json +++ b/specials/news.json @@ -29,18 +29,15 @@ ] }, { - "id": "perfil", + "id": "order", "type": "list", - "label": "@60666", + "label": "Ordinamento", "default": 0, "enabled": true, "visible": true, "lvalues": [ - "@60667", - "@60668", - "@60669", - "@60670", - "@60671" + "Default", + "Alfabetico" ] } ] diff --git a/specials/news.py b/specials/news.py index 870731df..800161ee 100644 --- a/specials/news.py +++ b/specials/news.py @@ -453,8 +453,9 @@ def no_group(list_result_canal): # i.text_color = color3 itemlist.append(i.clone()) - - return sorted(itemlist, key=lambda it: it.title.lower()) + if config.get_setting('order','news') == 1: + itemlist = sorted(itemlist, key=lambda it: it.title.lower()) + return itemlist def group_by_channel(list_result_canal):