fix VIDEO_TS playlist

This commit is contained in:
nikk gitanes
2023-02-24 03:27:36 +03:00
parent 53313c6701
commit fb2ba1e386
2 changed files with 3 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ func init() {
{"video/mp2t", ".ts,.m2ts,.mts"}, {"video/mp2t", ".ts,.m2ts,.mts"},
{"video/ogg", ".ogv"}, {"video/ogg", ".ogv"},
{"video/webm", ".webm"}, {"video/webm", ".webm"},
{"video/x-ms-vob", ".vob"},
{"video/x-msvideo", ".avi"}, {"video/x-msvideo", ".avi"},
{"video/x-quicktime", ".qt,.mov"}, {"video/x-quicktime", ".qt,.mov"},
{"text/srt", ".srt"}, {"text/srt", ".srt"},

View File

@@ -2,6 +2,7 @@ package utils
import ( import (
"path/filepath" "path/filepath"
"strings"
"server/torr/state" "server/torr/state"
) )
@@ -68,7 +69,7 @@ var extAudio = map[string]interface{}{
} }
func GetMimeType(filename string) string { func GetMimeType(filename string) string {
ext := filepath.Ext(filename) ext := strings.ToLower(filepath.Ext(filename))
if _, ok := extVideo[ext]; ok { if _, ok := extVideo[ext]; ok {
return "video/*" return "video/*"
} }