forked from 0x2620/pandora
only extract timeline if needed
This commit is contained in:
parent
00145a603b
commit
58461287d4
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import os
|
import os
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
from ... import models
|
from ... import models
|
||||||
|
|
||||||
|
@ -46,8 +47,8 @@ class Command(BaseCommand):
|
||||||
for s in models.Stream.objects.exclude(format=format, resolution=resolution).filter(source=None):
|
for s in models.Stream.objects.exclude(format=format, resolution=resolution).filter(source=None):
|
||||||
s.source = models.Stream.objects.get(file=s.file, resolution=resolution, format=format)
|
s.source = models.Stream.objects.get(file=s.file, resolution=resolution, format=format)
|
||||||
s.save()
|
s.save()
|
||||||
#extract timelines
|
|
||||||
for s in models.Stream.objects.filter(source=None):
|
for s in models.Stream.objects.filter(source=None):
|
||||||
|
if not glob("%s*"%s.timeline_prefix):
|
||||||
s.make_timeline()
|
s.make_timeline()
|
||||||
s.file.selected = True
|
s.file.selected = True
|
||||||
s.file.save()
|
s.file.save()
|
||||||
|
|
Loading…
Reference in a new issue