aspectratio

This commit is contained in:
j 2011-10-29 01:27:44 +02:00
parent b7e03c0f14
commit 2a7fa3e4e8
3 changed files with 4 additions and 4 deletions

View file

@ -500,7 +500,7 @@ class Stream(models.Model):
def json(self): def json(self):
return { return {
'duration': self.duration, 'duration': self.duration,
'aspectRatio': self.aspect_ratio, 'aspectratio': self.aspect_ratio,
} }
def delete_stream(sender, **kwargs): def delete_stream(sender, **kwargs):

View file

@ -657,7 +657,7 @@ class Item(models.Model):
s.published = self.published s.published = self.published
s.rightslevel = self.level s.rightslevel = self.level
s.aspectratio = self.get('aspectRatio') s.aspectratio = self.get('aspectratio')
s.words = sum([len(a.value.split()) for a in self.annotations.exclude(value='')]) s.words = sum([len(a.value.split()) for a in self.annotations.exclude(value='')])
s.clips = self.clips.count() s.clips = self.clips.count()

View file

@ -646,8 +646,8 @@ pandora.ui.infoView = function(data) {
return image.selected; return image.selected;
})[0]; })[0];
$list = Ox.IconList({ $list = Ox.IconList({
defaultRatio: ui.icons == 'posters' ? 5/8 : data.stream.aspectRatio, defaultRatio: ui.icons == 'posters' ? 5/8 : data.stream.aspectratio,
fixedRatio: ui.icons == 'posters' ? false : data.stream.aspectRatio, fixedRatio: ui.icons == 'posters' ? false : data.stream.aspectratio,
item: function(data, sort, size) { item: function(data, sort, size) {
var ratio = data.width / data.height; var ratio = data.width / data.height;
size = size || 128; size = size || 128;