From 79d0d8e290466a29f9065454d284cb6ac8b285d1 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 2 Jan 2019 19:25:53 +0100 Subject: [PATCH] fix additional keys in metadata dialog --- pandora/settings.py | 1 + static/js/metadataDialog.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pandora/settings.py b/pandora/settings.py index 4f24c8fc6..6a2f41d09 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -228,6 +228,7 @@ ADDITIONAL_IMDB_KEYS = [ 'cast', 'links', 'reviews', 'posters', 'alternativeTitles', 'originalTitle', + 'filmingLocations' ] #If you set VIDEO_PREFIX make sure cookies work accros subsomains diff --git a/static/js/metadataDialog.js b/static/js/metadataDialog.js index 38a0e941a..f92770650 100644 --- a/static/js/metadataDialog.js +++ b/static/js/metadataDialog.js @@ -27,8 +27,7 @@ pandora.ui.metadataDialog = function(data) { $input = {}, extraKeyTitles = { - 'alternativeTitles': 'Alternative Titles', - 'filmingLocations': 'Filming Locations' + 'alternativeTitles': 'Alternative Titles' }, that = data.imdbId ? updateDialog() : idDialog(); @@ -365,10 +364,11 @@ pandora.ui.metadataDialog = function(data) { } function updateMetadata() { - var edit = {id: data.id}, type; + var item, edit = {id: data.id}, type; updateKeys.forEach(function(key) { + item = getItemKey(key); type = key == 'alternativeTitles' ? [] - : getItemKey(key).type; + : item ? item.type : 'string'; edit[getKey(key)] = imdb[key] || ( Ox.isArray(type) ? [] : '' );