From 65fc082b1b70a73822cfc2fd984417f56a94ff08 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 14 Nov 2021 13:42:06 +0000 Subject: [PATCH] if file has audio/video track flag as type --- pandora/archive/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index cfaad3865..3f47ca8be 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -181,6 +181,11 @@ class File(models.Model): for type in ox.movie.EXTENSIONS: if data['extension'] in ox.movie.EXTENSIONS[type]: data['type'] = type + if data['type'] == 'unknown': + if self.info.get('video'): + data['type'] = 'video' + elif self.info.get('audio'): + data['type'] = 'audio' if 'part' in data and isinstance(data['part'], int): data['part'] = str(data['part']) return data