Fix bug getting content_type for "audio only"
This commit is contained in:
parent
b8434ff444
commit
7d333487fe
|
@ -1140,7 +1140,11 @@ class Media(models.Model):
|
|||
def content_type(self):
|
||||
if not self.downloaded:
|
||||
return 'video/mp4'
|
||||
vcodec = self.downloaded_video_codec.lower()
|
||||
vcodec = self.downloaded_video_codec
|
||||
if vcodec is None:
|
||||
return 'audio/ogg'
|
||||
|
||||
vcodec = vcodec.lower()
|
||||
if vcodec == 'vp9':
|
||||
return 'video/webm'
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue