dont fail if movie is unknown
This commit is contained in:
parent
5fd8aca20d
commit
0e18cf0604
2 changed files with 15 additions and 11 deletions
|
@ -32,6 +32,7 @@ pandora.ui.info = function(id) {
|
|||
} else {
|
||||
// Video Preview
|
||||
pandora.api.get({id: id, keys: ['duration', 'videoRatio']}, function(result) {
|
||||
if(result.data) {
|
||||
var height = Math.round(pandora.user.ui.sidebarSize / result.data.videoRatio) + 16;
|
||||
pandora.$ui.videoPreview && pandora.$ui.videoPreview.removeElement();
|
||||
pandora.$ui.videoPreview = pandora.ui.videoPreview({
|
||||
|
@ -41,6 +42,7 @@ pandora.ui.info = function(id) {
|
|||
}).appendTo(pandora.$ui.info);
|
||||
pandora.user.infoRatio = pandora.user.ui.sidebarSize / height;
|
||||
resize(height);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (pandora.$ui.leftPanel) {
|
||||
|
|
|
@ -403,8 +403,10 @@ pandora.ui.item = function() {
|
|||
})
|
||||
);
|
||||
}
|
||||
if (result.data) {
|
||||
var director = result.data.director?' ('+result.data.director.join(', ')+')':'';
|
||||
pandora.$ui.total.html(result.data.title + director);
|
||||
}
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue