Files
zurg/pkg/utils/playable.go
2024-02-03 03:44:44 +01:00

16 lines
444 B
Go

package utils
import "strings"
func IsPlayable(filePath string) bool {
filePath = strings.ToLower(filePath)
return strings.HasSuffix(filePath, ".avi") ||
strings.HasSuffix(filePath, ".m2ts") ||
strings.HasSuffix(filePath, ".m4v") ||
strings.HasSuffix(filePath, ".mkv") ||
strings.HasSuffix(filePath, ".mp4") ||
strings.HasSuffix(filePath, ".mpg") ||
strings.HasSuffix(filePath, ".ts") ||
strings.HasSuffix(filePath, ".wmv")
}