format imdbId

This commit is contained in:
j 2019-10-31 14:16:45 +01:00
parent 65fdcc95bc
commit 8c3f0424b1

View file

@ -397,6 +397,8 @@ pandora.ui.infoView = function(data, isMixed) {
edit[key] = value edit[key] = value
? Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities) ? Ox.decodeHTMLEntities(value).split('; ').map(Ox.encodeHTMLEntities)
: []; : [];
} else if (key == 'imdbId') {
edit[key] = value ? value.match(/\d+/)[0] : value;
} else { } else {
edit[key] = value ? value : null; edit[key] = value ? value : null;
} }
@ -471,6 +473,9 @@ pandora.ui.infoView = function(data, isMixed) {
var ret; var ret;
if (nameKeys.indexOf(key) > -1) { if (nameKeys.indexOf(key) > -1) {
ret = formatLink(value.split(', '), 'name'); ret = formatLink(value.split(', '), 'name');
} else if (key == 'imdbId') {
ret = '<a href="http://www.imdb.com/title/tt'
+ value + '">' + value + '</a>';
} else if ( } else if (
listKeys.indexOf(key) > -1 && Ox.getObjectById(pandora.site.itemKeys, key).type[0] == 'date' listKeys.indexOf(key) > -1 && Ox.getObjectById(pandora.site.itemKeys, key).type[0] == 'date'
) { ) {