From e5ffcf23f3b5dc66ea5f03a839747660ca123504 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 17 Aug 2011 21:30:37 +0200 Subject: [PATCH] new frame urls --- static/js/pandora/ui/item.js | 6 ++++-- static/js/pandora/ui/list.js | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js index 52cd70f..75c6f91 100644 --- a/static/js/pandora/ui/item.js +++ b/static/js/pandora/ui/item.js @@ -131,6 +131,7 @@ pandora.ui.item = function() { } } else if (pandora.user.ui.itemView == 'map') { + var video = result.data.stream; pandora.$ui.contentPanel.replaceElement(1, Ox.SplitPanel({ elements: [ { @@ -178,12 +179,13 @@ pandora.ui.item = function() { }, { element: pandora.$ui.clips = Ox.IconList({ + fixedRatio: video.aspectRatio, item: function(data, sort, size) { size = size || 128; var ratio = data.aspectRatio, width = size, - height = size/ratio, - url = '/' + data.item + '/' + size + '/'+data['in'] + '.jpg'; + height = parseInt(size/ratio), + url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg'; return { height: height, id: data['id'], diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index c65b25c..c516e56 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -208,8 +208,8 @@ pandora.ui.list = function() { // fixme: remove view argument Ox.print('RATIO', data.aspectRatio); size = size || 128; var width = data.aspectRatio < fixedRatio ? size : size * data.aspectRatio / fixedRatio, - height = width / data.aspectRatio, - url = '/' + data.item + '/' + width + '/' + data['in'] + '.jpg'; + height = parseInt(width / data.aspectRatio), + url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg'; return { height: height, id: data.id,