forked from 0x2620/pandora
version
This commit is contained in:
parent
16c8193c69
commit
1bbf76f918
2 changed files with 5 additions and 2 deletions
|
@ -126,9 +126,12 @@ class File(models.Model):
|
|||
if not self.is_audio and not self.is_video and self.name.endswith('.srt'):
|
||||
self.is_subtitle = True
|
||||
|
||||
if self.name and self.name.startswith('Extras/'):
|
||||
if self.name and self.name.lower().startswith('extras/'):
|
||||
self.is_extra = True
|
||||
self.is_main = False
|
||||
elif self.name and self.name.lower().startswith('versions/'):
|
||||
self.is_version = True
|
||||
self.is_main = False
|
||||
else:
|
||||
self.is_extra = False
|
||||
self.is_main = True
|
||||
|
|
|
@ -64,7 +64,7 @@ def update_files(user, volume, files):
|
|||
for f in files:
|
||||
folder = f['path'].split('/')
|
||||
name = folder.pop()
|
||||
if folder and folder[-1] in ('Extras', 'Versions', 'DVDs'):
|
||||
if folder and folder[-1].lower() in ('extras', 'versions', 'dvds'):
|
||||
name = '/'.join([folder.pop(), name])
|
||||
f['folder'] = '/'.join(folder)
|
||||
f['name'] = name
|
||||
|
|
Loading…
Reference in a new issue