get_or_create clip

This commit is contained in:
j 2011-10-20 21:32:31 +02:00
commit a546d07b73
4 changed files with 39 additions and 20 deletions

View file

@ -135,8 +135,9 @@ class File(models.Model):
self.is_subtitle = False
self.type = self.get_type()
info = ox.parse_movie_path(self.path)
self.language = info['language']
if self.instances.count()>0:
info = ox.parse_movie_path(self.path)
self.language = info['language']
self.part = self.get_part()
if self.type not in ('audio', 'video'):