forked from 0x2620/pandora
support .mts
This commit is contained in:
parent
76229574bc
commit
0ea397cac5
1 changed files with 3 additions and 3 deletions
|
@ -126,9 +126,9 @@ class File(models.Model):
|
||||||
self.pixels = int(self.width * self.height * float(utils.parse_decimal(self.framerate)) * self.duration)
|
self.pixels = int(self.width * self.height * float(utils.parse_decimal(self.framerate)) * self.duration)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.is_video = os.path.splitext(self.path)[-1] in ('.avi', '.mkv', '.dv', '.ogv', '.mpeg', '.mov', '.webm', '.mp4', '.mpg', '.wmv')
|
self.is_video = os.path.splitext(self.path)[-1].lower() in ('.avi', '.mkv', '.dv', '.ogv', '.mpeg', '.mov', '.webm', '.mp4', '.mpg', '.wmv', '.mts')
|
||||||
self.is_audio = os.path.splitext(self.path)[-1] in ('.mp3', '.wav', '.ogg', '.flac', '.oga', '.wma')
|
self.is_audio = os.path.splitext(self.path)[-1].lower() in ('.mp3', '.wav', '.ogg', '.flac', '.oga', '.wma')
|
||||||
self.is_subtitle = os.path.splitext(self.path)[-1] in ('.srt', )
|
self.is_subtitle = os.path.splitext(self.path)[-1].lower() in ('.srt', )
|
||||||
|
|
||||||
if self.path.endswith('.srt'):
|
if self.path.endswith('.srt'):
|
||||||
self.is_subtitle = True
|
self.is_subtitle = True
|
||||||
|
|
Loading…
Reference in a new issue