dont call save twice creating an annotation
This commit is contained in:
parent
8dca4cb676
commit
21cb2e3519
2 changed files with 7 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ class File(models.Model):
|
|||
self.pixels = int(self.width * self.height * float(utils.parse_decimal(self.framerate)) * self.duration)
|
||||
|
||||
else:
|
||||
self.is_video = os.path.splitext(self.path)[-1] in ('.avi', '.mkv', '.dv', '.ogv', '.mpeg', '.mov', '.webm')
|
||||
self.is_video = os.path.splitext(self.path)[-1] in ('.avi', '.mkv', '.dv', '.ogv', '.mpeg', '.mov', '.webm', '.mp4', '.mpg')
|
||||
self.is_audio = os.path.splitext(self.path)[-1] in ('.mp3', '.wav', '.ogg', '.flac', '.oga')
|
||||
self.is_subtitle = os.path.splitext(self.path)[-1] in ('.srt', )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue