From d37f55b69dd8c59698db002f0877b00e55c50391 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 10 Jun 2020 17:47:20 +0200 Subject: [PATCH] Fix Community Channel --- specials/community.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/specials/community.py b/specials/community.py index 9104aba2..ff553beb 100644 --- a/specials/community.py +++ b/specials/community.py @@ -589,14 +589,18 @@ def filter_thread(filter, key, item, description): # for load json from item or url def load_json(item, no_order=False): support.log() - - url = item.url if type(item) == Item else item + if type(item) == Item: + url = item.url + filterkey = item.filterkey + else: + url = item + filterkey = '' try: if url.startswith('http'): json_file = httptools.downloadpage(url).data else: json_file = open(url, "r").read() - if no_order or item.filterkey: + if no_order or filterkey: json = jsontools.load(json_file) else: json = jsontools.load(json_file, object_pairs_hook=OrderedDict)