From df38aad4f78ecdde301f001c5da1daab97551e6d Mon Sep 17 00:00:00 2001 From: j Date: Thu, 6 Dec 2018 21:02:43 +0100 Subject: [PATCH] extra title keys --- static/js/metadataDialog.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/static/js/metadataDialog.js b/static/js/metadataDialog.js index f035addf..0ee21c72 100644 --- a/static/js/metadataDialog.js +++ b/static/js/metadataDialog.js @@ -26,13 +26,15 @@ pandora.ui.metadataDialog = function(data) { $label = {}, $input = {}, + extraKeyTitles = { + 'alternativeTitles': 'Alternative Titles', + 'filmingLocations': 'Filming Locations' + }, + that = data.imdbId ? updateDialog() : idDialog(); keys = keys.filter(function(key) { - return Ox.contains([ - 'alternativeTitles', - 'filmingLocations' - ], key) || getItemKey(key); + return key in extraKeyTitles || getItemKey(key); }); data.imdbId && getMetadata(); @@ -298,10 +300,7 @@ pandora.ui.metadataDialog = function(data) { } function getTitle(key) { - return Ox._( - key == 'alternativeTitles' ? 'Alternative Titles' - : getItemKey(key).title - ); + return Ox._(extraKeyTitles[key] || getItemKey(key).title); } function getUpdateKeys() {