From 8c3f0424b1ff8b5643461f44a01d7dd10781c5e7 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 31 Oct 2019 14:16:45 +0100 Subject: [PATCH] format imdbId --- static/js/infoView.martialarts.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/infoView.martialarts.js b/static/js/infoView.martialarts.js index 8be6d91..e5a4383 100644 --- a/static/js/infoView.martialarts.js +++ b/static/js/infoView.martialarts.js @@ -397,6 +397,8 @@ pandora.ui.infoView = function(data, isMixed) { edit[key] = value ? Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities) : []; + } else if (key == 'imdbId') { + edit[key] = value ? value.match(/\d+/)[0] : value; } else { edit[key] = value ? value : null; } @@ -471,6 +473,9 @@ pandora.ui.infoView = function(data, isMixed) { var ret; if (nameKeys.indexOf(key) > -1) { ret = formatLink(value.split(', '), 'name'); + } else if (key == 'imdbId') { + ret = '' + value + ''; } else if ( listKeys.indexOf(key) > -1 && Ox.getObjectById(pandora.site.itemKeys, key).type[0] == 'date' ) {