make sure videoPreview is up to date

This commit is contained in:
j 2015-11-10 16:08:00 +01:00
parent 4bdce55364
commit 9be454dfba
3 changed files with 5 additions and 3 deletions

View file

@ -92,7 +92,7 @@ pandora.ui.info = function() {
} else if (view == 'video') { } else if (view == 'video') {
pandora.api.get({ pandora.api.get({
id: id, id: id,
keys: ['duration', 'posterFrame', 'rendered', 'videoRatio'] keys: ['duration', 'posterFrame', 'rendered', 'videoRatio', 'modified']
}, function(result) { }, function(result) {
emptyInfo(); emptyInfo();
if (result.data && result.data.rendered) { if (result.data && result.data.rendered) {
@ -102,6 +102,7 @@ pandora.ui.info = function() {
frameRatio: result.data.videoRatio, frameRatio: result.data.videoRatio,
height: pandora.getInfoHeight(true), height: pandora.getInfoHeight(true),
id: id, id: id,
modified: result.data.modified,
position: !ui.item && ui.listView == 'timelines' position: !ui.item && ui.listView == 'timelines'
? (ui.videoPoints[id] ? ui.videoPoints[id].position : 0) ? (ui.videoPoints[id] ? ui.videoPoints[id].position : 0)
: result.data.posterFrame, : result.data.posterFrame,

View file

@ -536,6 +536,7 @@ pandora.ui.listIconPanel = function(listData) {
frameRatio: itemData.videoRatio, frameRatio: itemData.videoRatio,
height: 256, height: 256,
id: itemData.id, id: itemData.id,
modified: itemData.modified,
position: position, position: position,
width: 256 width: 256
}) })

View file

@ -14,13 +14,13 @@ pandora.ui.videoPreview = function(data) {
: Ox.max(pandora.site.video.resolutions); : Ox.max(pandora.site.video.resolutions);
return pandora.getMediaURL('/' + data.id + '/' + resolution + 'p' + ( return pandora.getMediaURL('/' + data.id + '/' + resolution + 'p' + (
Ox.isUndefined(position) ? '' : position Ox.isUndefined(position) ? '' : position
) + '.jpg'); ) + '.jpg?' + data.modified);
}, },
frameRatio: data.frameRatio, frameRatio: data.frameRatio,
height: data.height, height: data.height,
position: data.position, position: data.position,
scaleToFill: true, scaleToFill: true,
timeline: pandora.getMediaURL('/' + data.id + '/timeline16p.jpg'), timeline: pandora.getMediaURL('/' + data.id + '/timeline16p.jpg?' + data.modified),
videoTooltip: data.videoTooltip, videoTooltip: data.videoTooltip,
width: data.width width: data.width
}); });