From 0430a0f236b76e9ab11707e6e8a35063009456cf Mon Sep 17 00:00:00 2001 From: j Date: Tue, 9 Aug 2016 12:56:26 +0100 Subject: [PATCH 1/3] cache getMediaUrlInfo --- pandora/archive/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 905e8ddaf..161525cfe 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -740,7 +740,7 @@ def getMediaUrlInfo(request, data): response = json_response() response['data']['items'] = external.get_info(data['url']) return render_to_json_response(response) -actions.register(getMediaUrlInfo, cache=False) +actions.register(getMediaUrlInfo, cache=True) @login_required_json def addMediaUrl(request, data): From 7f8b5448e65aba9a1ccf828d1e5884a61cf8edaa Mon Sep 17 00:00:00 2001 From: j Date: Tue, 9 Aug 2016 12:56:54 +0100 Subject: [PATCH 2/3] set default config importMetadata --- pandora/app/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora/app/config.py b/pandora/app/config.py index b24cbd6a9..2dca1705f 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -95,14 +95,14 @@ def load_config(init=False): config['keys'][key['id']] = key - #add missing defaults + # add missing defaults for section in sorted(( 'capabilities', 'cantPlay', 'entities', 'itemName', 'itemTitleKeys', 'media', 'posters', 'site', 'tv', 'user.ui', 'user.ui.part', 'user.ui.showFolder', 'menuExtras', 'languages' )): parts = map(lambda p: p.replace('\0', '\\.'), section.replace('\\.', '\0').split('.')) - #print('checking', section) + # print('checking', section) c = config d = default while len(parts): @@ -128,8 +128,8 @@ def load_config(init=False): if added: sys.stderr.write("adding default %s:\n\t" % section) sys.stderr.write("\n\t".join(added) + '\n\n') - for key in ('language', ): - if not key in config: + for key in ('language', 'importMetadata'): + if key not in config: sys.stderr.write("adding default value:\n\t\"%s\": %s,\n\n" % (key, json.dumps(default[key]))) config[key] = default[key] From 9991767d0162651f085834c35b7ff0353ee4fd75 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 9 Aug 2016 13:03:21 +0100 Subject: [PATCH 3/3] no summary in default importMetadata keys --- pandora/config.pandora.jsonc | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index 209a1c9ba..6056581b8 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -162,7 +162,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. with "{date}". */ "importMetadata": { - "summary": "{description}", "title": "{title}" }, /*