prefs/aspect

This commit is contained in:
j 2011-10-20 10:24:41 +02:00
parent 6835937431
commit 3a420ab0c8
4 changed files with 4 additions and 5 deletions

View file

@ -562,7 +562,6 @@
],
"user": {
"level": "guest",
"preferences": {},
"ui": {
"annotationsSize": 256,
"clipsColumns": 2,

View file

@ -622,6 +622,7 @@ class Item(models.Model):
s.modified = self.modified
s.published = self.published
s.aspectratio = self.get('aspectRatio')
# sort values based on data from videos
s.words = sum([len(a.value.split()) for a in self.annotations.all()])
s.clips= self.clips.count()
@ -631,7 +632,8 @@ class Item(models.Model):
s.duration = sum([v.duration for v in videos])
v = videos[0]
s.resolution = v.width * v.height
s.aspectratio = float(utils.parse_decimal(v.display_aspect_ratio))
if not s.aspectratio:
s.aspectratio = float(utils.parse_decimal(v.display_aspect_ratio))
s.pixels = sum([v.pixels for v in videos])
s.numberoffiles = self.files.all().count()
s.parts = videos.count()
@ -644,7 +646,6 @@ class Item(models.Model):
else:
s.duration = None
s.resolution = None
s.aspectratio = None
s.bitrate = None
s.pixels = None
s.filename = None

View file

@ -393,7 +393,6 @@
{"id": "timelines", "title": "Timelines", "items": [0, 1, 2, 3, 4, 5, 6, 7, 8]}
]
},
"preferences": {},
"ui": {
"annotationsSize": 256,
"find": {"index": -1, "key": "", "value": ""},

View file

@ -7,7 +7,7 @@ pandora.ui.contactForm = function() {
id: 'email',
label: 'E-Mail',
labelWidth: 60,
value: pandora.user.preferences.email,
value: pandora.user.email,
width: 240
}),
Ox.Input({