diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 338f731..24f2fbe 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -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: