fix V1/V2 naming, handle animation players, don't use blank, results in white
This commit is contained in:
parent
4058ac84c1
commit
ff752a1818
3 changed files with 49 additions and 25 deletions
|
|
@ -10,6 +10,18 @@ import item.models
|
|||
import itemlist.models
|
||||
|
||||
|
||||
def resolve_roman(s):
|
||||
extra = re.compile('^\d+(.*?)$').findall(s)
|
||||
if extra:
|
||||
extra = extra[0].lower()
|
||||
new = {
|
||||
'i': '1', 'ii': '2', 'iii': '3', 'iv': '4', 'v': '5',
|
||||
'vi': '6', 'vii': 7, 'viii': '8', 'ix': '9', 'x': '10'
|
||||
}.get(extra, extra)
|
||||
return s.replace(extra, new)
|
||||
return s
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'generate symlinks to clips and clips.json'
|
||||
|
||||
|
|
@ -44,8 +56,12 @@ class Command(BaseCommand):
|
|||
clip['editingtags'] = i.data.get('editingtags', [])
|
||||
name = os.path.basename(clip['original'])
|
||||
|
||||
seqid = re.sub("Hotel Aporia_(\d+)", "S\\1_", name).split('_')[:2]
|
||||
seqid = re.sub("Hotel Aporia_(\d+)", "S\\1_", name)
|
||||
seqid = re.sub("Night March_(\d+)", "S\\1_", seqid)
|
||||
seqid = re.sub("_(\d+)H_(\d+)", "_S\\1\\2_", seqid)
|
||||
seqid = seqid.split('_')[:2]
|
||||
seqid = [b[1:] if b[0] in ('B', 'S') else '0' for b in seqid]
|
||||
seqid[1] = resolve_roman(seqid[1])
|
||||
seqid[1] = ''.join([b for b in seqid[1] if b.isdigit()])
|
||||
if not seqid[1]:
|
||||
seqid[1] = '0'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue