Ordine di default per novità

This commit is contained in:
Alhaziel01
2020-07-31 17:54:10 +02:00
parent 009a3ecabb
commit 0959ff5b7c
2 changed files with 7 additions and 9 deletions
+4 -7
View File
@@ -29,18 +29,15 @@
] ]
}, },
{ {
"id": "perfil", "id": "order",
"type": "list", "type": "list",
"label": "@60666", "label": "Ordinamento",
"default": 0, "default": 0,
"enabled": true, "enabled": true,
"visible": true, "visible": true,
"lvalues": [ "lvalues": [
"@60667", "Default",
"@60668", "Alfabetico"
"@60669",
"@60670",
"@60671"
] ]
} }
] ]
+3 -2
View File
@@ -453,8 +453,9 @@ def no_group(list_result_canal):
# i.text_color = color3 # i.text_color = color3
itemlist.append(i.clone()) itemlist.append(i.clone())
if config.get_setting('order','news') == 1:
return sorted(itemlist, key=lambda it: it.title.lower()) itemlist = sorted(itemlist, key=lambda it: it.title.lower())
return itemlist
def group_by_channel(list_result_canal): def group_by_channel(list_result_canal):