forked from 0x2620/pandora
random 1, update sort after import
This commit is contained in:
parent
9c5ba8614b
commit
d34b2e4860
2 changed files with 2 additions and 1 deletions
|
@ -119,6 +119,7 @@ def update_stream(id):
|
|||
s.file.item.update_timeline()
|
||||
#make sure all derivatives exist
|
||||
s.extract_derivatives()
|
||||
s.file.item.update_sort()
|
||||
|
||||
#update clips
|
||||
for c in s.file.item.clips.all():
|
||||
|
|
|
@ -22,7 +22,7 @@ def update_random_sort():
|
|||
random.seed()
|
||||
ids = [f['item'] for f in models.ItemSort.objects.values('item')]
|
||||
random.shuffle(ids)
|
||||
n = 0
|
||||
n = 1
|
||||
for i in ids:
|
||||
models.ItemSort.objects.filter(pk=i).update(random=n)
|
||||
n += 1
|
||||
|
|
Loading…
Reference in a new issue