From 679c51238e458179abd72f93e21983d678ff4a53 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 9 May 2018 10:22:29 +0100 Subject: [PATCH] only get metadata keys defined in itemKeys --- static/js/idDialog.js | 2 +- static/js/metadataDialog.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/idDialog.js b/static/js/idDialog.js index cf9b630f0..aab1adc62 100644 --- a/static/js/idDialog.js +++ b/static/js/idDialog.js @@ -189,7 +189,7 @@ pandora.ui.idDialog = function(data) { if (item.originalTitle == data.title) { item.originalTitle = highlightTitle(item.originalTitle); } - if (item.director) { + if (item.director && data.director) { item.director.forEach(function(director, i) { if (Ox.contains(data.director, director)) { item.director[i] = highlightTitle(director); diff --git a/static/js/metadataDialog.js b/static/js/metadataDialog.js index ea316f2d8..944832e12 100644 --- a/static/js/metadataDialog.js +++ b/static/js/metadataDialog.js @@ -27,6 +27,10 @@ pandora.ui.metadataDialog = function(data) { that = data.imdbId ? updateDialog() : idDialog(); + keys = keys.filter(function(key) { + return getItemKey(key); + }); + data.imdbId && getMetadata(); function idDialog() {