sort by number of annotations
This commit is contained in:
parent
c017e935ad
commit
a123d4daf7
3 changed files with 9 additions and 1 deletions
|
|
@ -654,6 +654,7 @@ class Item(models.Model):
|
|||
'id',
|
||||
'lightness',
|
||||
'modified',
|
||||
'numberofannotations',
|
||||
'numberofcuts',
|
||||
'numberoffiles',
|
||||
'parts',
|
||||
|
|
@ -771,6 +772,7 @@ class Item(models.Model):
|
|||
s.hue = None
|
||||
s.saturation = None
|
||||
s.brighness = None
|
||||
s.numberofannotations = self.annotations.all().count()
|
||||
s.numberofcuts = len(self.data.get('cuts', []))
|
||||
if s.duration:
|
||||
s.cutsperminute = s.numberofcuts / (s.duration/60)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue