Compare commits
2 commits
ecd88fe8a2
...
c1c7fc27d3
Author | SHA1 | Date | |
---|---|---|---|
c1c7fc27d3 | |||
215f0db071 |
2 changed files with 6 additions and 1 deletions
|
@ -59,7 +59,7 @@ class Command(BaseCommand):
|
||||||
src = source.data.path
|
src = source.data.path
|
||||||
target = os.path.join(prefix, 'voice_over', batch, '%s.wav' % fragment_id)
|
target = os.path.join(prefix, 'voice_over', batch, '%s.wav' % fragment_id)
|
||||||
os.makedirs(os.path.dirname(target), exist_ok=True)
|
os.makedirs(os.path.dirname(target), exist_ok=True)
|
||||||
if os.path.exists(target):
|
if os.path.islink(target):
|
||||||
os.unlink(target)
|
os.unlink(target)
|
||||||
os.symlink(src, target)
|
os.symlink(src, target)
|
||||||
voice_over[fragment_id][batch] = {
|
voice_over[fragment_id][batch] = {
|
||||||
|
|
5
utils.py
5
utils.py
|
@ -19,6 +19,11 @@ def upgrade_originals():
|
||||||
def remove_deselected_files():
|
def remove_deselected_files():
|
||||||
il = itemlist.models.List.objects.get(name='New Originals')
|
il = itemlist.models.List.objects.get(name='New Originals')
|
||||||
for i in il.items.all():
|
for i in il.items.all():
|
||||||
|
changed = False
|
||||||
for f in i.files.filter(selected=False):
|
for f in i.files.filter(selected=False):
|
||||||
f.data.delete()
|
f.data.delete()
|
||||||
f.delete()
|
f.delete()
|
||||||
|
changed = True
|
||||||
|
if changed:
|
||||||
|
i.save()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue