Additional playable extensions
This commit is contained in:
15
pkg/utils/playable.go
Normal file
15
pkg/utils/playable.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user