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": { "user": {
"level": "guest", "level": "guest",
"preferences": {},
"ui": { "ui": {
"annotationsSize": 256, "annotationsSize": 256,
"clipsColumns": 2, "clipsColumns": 2,

View file

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

View file

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

View file

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