diff --git a/scripts/poster.fierfly.py b/scripts/poster.fierfly.py index 10ad3c4..3596abf 100755 --- a/scripts/poster.fierfly.py +++ b/scripts/poster.fierfly.py @@ -17,7 +17,7 @@ def render_poster(data, poster): title = ox.decode_html(data.get('title', '')) director = ox.decode_html(', '.join(data.get('show', []))) - year = str(data.get('date', '')) + year = str(data.get('date', '')).split(" ")[0] series = data.get('isSeries', False) oxdb_id = data['oxdbId'] imdb_id = data['id'] @@ -33,7 +33,7 @@ def render_poster(data, poster): } ] }, - "keys": ["id", "frame"] + "keys": ["id", "image"] })["data"]["items"] if r: did = r[0]["image"] diff --git a/static/js/infoView.firefly.js b/static/js/infoView.firefly.js index 010ce6f..c3bb4f6 100644 --- a/static/js/infoView.firefly.js +++ b/static/js/infoView.firefly.js @@ -234,81 +234,6 @@ pandora.ui.infoView = function(data, isMixed) { pandora.createLinks($info); } - // Show description ----------------------------------------------------- - if (!isMultiple) { - ;['show'].forEach(key => { - var $box = $('
').appendTo($data); - (data[key] ? pandora.api.findEntities : Ox.noop)({ - query: { - conditions: [{ - key: 'type', operator: '==', value: Ox.decodeHTMLEntities(key) - }, { - key: 'name', operator: '==', value: Ox.decodeHTMLEntities(data[key][0] || '') - }], - operator: '&' - }, - keys: ['id', 'name', 'description', 'image'] - }, function(result) { - if (data[key] && ((result && result.data.items.length == 1) || canEdit)) { - var entity = {} - if (result && result.data.items.length) { - entity = result.data.items[0] - } - $('
') - .html(Ox._('About {0}:', [data[key]])) - .css({ - 'padding-top': '4px', - 'font-weight': 'bold' - }) - .appendTo($box); - $('
') - .addClass("InlineImages") - .append( - Ox.EditableContent({ - clickLink: pandora.clickLink, - editable: false, - placeholder: formatLight(Ox._('No {0} Description', [Ox._(Ox.toTitleCase(key))])), - tooltip: canEdit ? pandora.getEditTooltip() : '', - type: 'textarea', - value: entity.description || '' - }) - .css(css) - .css({ - 'text-align': '' - }) - .bindEvent({ - doubleclick: function(event) { - if (!canEdit) { - return - } - if (entity.id) { - var set = {} - set['entitiesType'] = key - set['entitiesSelection.' + key] = [entity.id]; - pandora.UI.set(set); - pandora.$ui.entitiesDialog = pandora.ui.entitiesDialog().open(); - } else { - pandora.api.addEntity({ - type: key, - name: data[key] - }, function(result) { - var set = {} - set['entitiesType'] = key - set['entitiesSelection.' + key] = [result.data.id]; - pandora.UI.set(set); - pandora.$ui.entitiesDialog = pandora.ui.entitiesDialog().open(); - }) - } - } - }) - ).css({ - margin: '12px 0', - }) - .appendTo($box); - } - }) - }); - } // Title ------------------------------------------------------------------- @@ -377,6 +302,86 @@ pandora.ui.infoView = function(data, isMixed) { .appendTo($text); } + // Show description ----------------------------------------------------- + if (!isMultiple) { + ;['show'].forEach(key => { + var $box = $('
') + .css({ + marginTop: '12px', + }) + .appendTo($text); + (data[key] ? pandora.api.findEntities : Ox.noop)({ + query: { + conditions: [{ + key: 'type', operator: '==', value: Ox.decodeHTMLEntities(key) + }, { + key: 'name', operator: '==', value: Ox.decodeHTMLEntities(data[key][0] || '') + }], + operator: '&' + }, + keys: ['id', 'name', 'description', 'image'] + }, function(result) { + if (data[key] && ((result && result.data.items.length == 1) || canEdit)) { + var entity = {} + if (result && result.data.items.length) { + entity = result.data.items[0] + } + $('
') + .html(Ox._('About {0}:', [data[key]])) + .css({ + 'padding-top': '4px', + 'font-weight': 'bold' + }) + .appendTo($box); + $('
') + .addClass("InlineImages") + .append( + Ox.EditableContent({ + clickLink: pandora.clickLink, + editable: false, + placeholder: formatLight(Ox._('No {0} Description', [Ox._(Ox.toTitleCase(key))])), + tooltip: canEdit ? pandora.getEditTooltip() : '', + type: 'textarea', + value: entity.description || '' + }) + .css(css) + .css({ + 'text-align': '' + }) + .bindEvent({ + doubleclick: function(event) { + if (!canEdit) { + return + } + if (entity.id) { + var set = {} + set['entitiesType'] = key + set['entitiesSelection.' + key] = [entity.id]; + pandora.UI.set(set); + pandora.$ui.entitiesDialog = pandora.ui.entitiesDialog().open(); + } else { + pandora.api.addEntity({ + type: key, + name: data[key] + }, function(result) { + var set = {} + set['entitiesType'] = key + set['entitiesSelection.' + key] = [result.data.id]; + pandora.UI.set(set); + pandora.$ui.entitiesDialog = pandora.ui.entitiesDialog().open(); + }) + } + } + }) + ).css({ + margin: '12px 0', + }) + .appendTo($text); + } + }) + }); + } + // Duration, Aspect Ratio -------------------------------------------------- if (!isMultiple) {