forked from 0x2620/pandora
prefs/aspect
This commit is contained in:
parent
6835937431
commit
3a420ab0c8
4 changed files with 4 additions and 5 deletions
|
@ -562,7 +562,6 @@
|
|||
],
|
||||
"user": {
|
||||
"level": "guest",
|
||||
"preferences": {},
|
||||
"ui": {
|
||||
"annotationsSize": 256,
|
||||
"clipsColumns": 2,
|
||||
|
|
|
@ -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,6 +632,7 @@ class Item(models.Model):
|
|||
s.duration = sum([v.duration for v in videos])
|
||||
v = videos[0]
|
||||
s.resolution = v.width * v.height
|
||||
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()
|
||||
|
@ -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
|
||||
|
|
|
@ -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": ""},
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue