forked from 0x2620/pandora
aspectratio
This commit is contained in:
parent
b7e03c0f14
commit
2a7fa3e4e8
3 changed files with 4 additions and 4 deletions
|
@ -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):
|
||||||
|
|
|
@ -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()
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue