Fix issue on streamable check

This commit is contained in:
Ben Sarmiento
2024-01-21 20:21:52 +01:00
parent 0115952178
commit 3131e3cbdf

View File

@@ -3,9 +3,11 @@ package utils
import "strings" import "strings"
func IsStreamable(filePath string) bool { func IsStreamable(filePath string) bool {
filePath = strings.ToLower(filePath)
return strings.HasSuffix(filePath, ".mkv") || return strings.HasSuffix(filePath, ".mkv") ||
strings.HasSuffix(filePath, ".mp4") || strings.HasSuffix(filePath, ".mp4") ||
strings.HasSuffix(filePath, ".avi") || strings.HasSuffix(filePath, ".avi") ||
strings.HasSuffix(filePath, ".wmv") || strings.HasSuffix(filePath, ".wmv") ||
strings.HasSuffix(filePath, ".m4v") strings.HasSuffix(filePath, ".m4v") ||
strings.HasSuffix(filePath, ".ts")
} }