From 1bbf76f91857939d1cae78fdecef14069f903d19 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 24 Feb 2011 17:28:44 +0100 Subject: [PATCH] version --- pandora/archive/models.py | 5 ++++- pandora/archive/tasks.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 862ce9351..9c3afc56e 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -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 diff --git a/pandora/archive/tasks.py b/pandora/archive/tasks.py index b844eb3de..e3f136810 100644 --- a/pandora/archive/tasks.py +++ b/pandora/archive/tasks.py @@ -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