dont normalize path for pad.ma like systems for now

This commit is contained in:
j 2012-10-06 16:37:13 +02:00
parent 9c3a354090
commit d340e753e5

View file

@ -161,7 +161,14 @@ class File(models.Model):
return data return data
def normalize_path(self): def normalize_path(self):
return ox.movie.format_path(self.get_path_info()) #FIXME: always use path_info
if settings.USE_IMDB:
return ox.movie.format_path(self.get_path_info())
else:
path = self.path or ''
if self.instances.all().count():
path = self.instances.all()[0].path
return path
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if self.id and not self.path_info and self.instances.count(): if self.id and not self.path_info and self.instances.count():