new frame urls

This commit is contained in:
j 2011-08-17 21:30:37 +02:00
parent 8f1ac057f5
commit ba1df87e46
2 changed files with 6 additions and 4 deletions

View file

@ -131,6 +131,7 @@ pandora.ui.item = function() {
} }
} else if (pandora.user.ui.itemView == 'map') { } else if (pandora.user.ui.itemView == 'map') {
var video = result.data.stream;
pandora.$ui.contentPanel.replaceElement(1, Ox.SplitPanel({ pandora.$ui.contentPanel.replaceElement(1, Ox.SplitPanel({
elements: [ elements: [
{ {
@ -178,12 +179,13 @@ pandora.ui.item = function() {
}, },
{ {
element: pandora.$ui.clips = Ox.IconList({ element: pandora.$ui.clips = Ox.IconList({
fixedRatio: video.aspectRatio,
item: function(data, sort, size) { item: function(data, sort, size) {
size = size || 128; size = size || 128;
var ratio = data.aspectRatio, var ratio = data.aspectRatio,
width = size, width = size,
height = size/ratio, height = parseInt(size/ratio),
url = '/' + data.item + '/' + size + '/'+data['in'] + '.jpg'; url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg';
return { return {
height: height, height: height,
id: data['id'], id: data['id'],

View file

@ -208,8 +208,8 @@ pandora.ui.list = function() { // fixme: remove view argument
Ox.print('RATIO', data.aspectRatio); Ox.print('RATIO', data.aspectRatio);
size = size || 128; size = size || 128;
var width = data.aspectRatio < fixedRatio ? size : size * data.aspectRatio / fixedRatio, var width = data.aspectRatio < fixedRatio ? size : size * data.aspectRatio / fixedRatio,
height = width / data.aspectRatio, height = parseInt(width / data.aspectRatio),
url = '/' + data.item + '/' + width + '/' + data['in'] + '.jpg'; url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg';
return { return {
height: height, height: height,
id: data.id, id: data.id,