From 49674a51b7737dacb8971cc340c1c3fccf3a01ac Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 24 Oct 2011 00:03:41 +0200 Subject: [PATCH] show video preview only if item is rendered --- static/js/pandora/info.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/info.js b/static/js/pandora/info.js index 2cf7b2c8..412d13d3 100644 --- a/static/js/pandora/info.js +++ b/static/js/pandora/info.js @@ -66,8 +66,11 @@ pandora.ui.info = function() { previousView == 'video' && resizeInfo(); }); } else if (view == 'video') { - pandora.api.get({id: id, keys: ['duration', 'videoRatio']}, function(result) { - if (result.data) { + pandora.api.get({ + id: id, + keys: ['duration', 'rendered', 'videoRatio'] + }, function(result) { + if (result.data && result.data.rendered) { pandora.$ui.videoPreview && pandora.$ui.videoPreview.removeElement(); pandora.$ui.videoPreview = pandora.ui.videoPreview({ duration: result.data.duration,