Update supported video extensions

This commit is contained in:
Ben Adrian Sarmiento
2024-06-19 20:29:05 +02:00
parent 9829b34254
commit 55edd46aa4
5 changed files with 16 additions and 15 deletions

View File

@@ -2,15 +2,16 @@ package utils
import "strings"
func IsPlayable(filePath string) bool {
func IsVideo(filePath string) bool {
filePath = strings.ToLower(filePath)
return strings.HasSuffix(filePath, ".avi") ||
strings.HasSuffix(filePath, ".m2ts") ||
strings.HasSuffix(filePath, ".m4v") ||
return strings.HasSuffix(filePath, ".avi") || // confirmed working
strings.HasSuffix(filePath, ".m2ts") || // confirmed working
strings.HasSuffix(filePath, ".m4v") || // confirmed working
strings.HasSuffix(filePath, ".mkv") || // confirmed working
strings.HasSuffix(filePath, ".mov") || // confirmed working
strings.HasSuffix(filePath, ".mp4") || // confirmed working
strings.HasSuffix(filePath, ".mpg") ||
strings.HasSuffix(filePath, ".ts") ||
strings.HasSuffix(filePath, ".wmv") ||
strings.HasSuffix(filePath, ".m4b") // confirmed working
strings.HasSuffix(filePath, ".mpg") || // confirmed working (no watch option in RD)
strings.HasSuffix(filePath, ".mpeg") || // confirmed working (no watch option in RD)
strings.HasSuffix(filePath, ".ts") || // confirmed working
strings.HasSuffix(filePath, ".wmv") // confirmed working
}