diff --git a/addon.xml b/addon.xml index d65050c..411a301 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/lib/gorrent2http/util.py b/lib/gorrent2http/util.py index b75b8c6..4e43a70 100644 --- a/lib/gorrent2http/util.py +++ b/lib/gorrent2http/util.py @@ -14,7 +14,7 @@ from .structs import MediaType SUBTITLES_FORMATS = ['.aqt', '.gsub', '.jss', '.sub', '.ttxt', '.pjs', '.psb', '.rt', '.smi', '.stl', '.ssf', '.srt', '.ssa', '.ass', '.usf', '.idx'] - +VIDEO_FORMATS = ['.mkv', '.mp4', '.avi', '.ogv', '.ts', '.flv', '.webm', '.vob', '.3gp', '.mpg', '.mpeg'] class Struct(dict): def __getattr__(self, attr): @@ -43,7 +43,9 @@ def detect_media_type(name): return MediaType.SUBTITLES else: mime_type = mimetypes.guess_type(name)[0] - if not mime_type: + if mime_type is None: + if ext.lower() in VIDEO_FORMATS: + return MediaType.VIDEO return MediaType.UNKNOWN mime_type = mime_type.split("/")[0] if mime_type == 'audio':