Moved everything out of internal

This commit is contained in:
Stash Dev
2019-02-09 18:53:08 -08:00
parent 5b5a72364f
commit 59782a377f
92 changed files with 87 additions and 85 deletions

17
manager/utils.go Normal file
View File

@@ -0,0 +1,17 @@
package manager
import "github.com/stashapp/stash/utils"
func IsStreamable(videoPath string, checksum string) (bool, error) {
fileType, err := utils.FileType(videoPath)
if err != nil {
return false, err
}
if fileType.MIME.Value == "video/quicktime" || fileType.MIME.Value == "video/mp4" || fileType.MIME.Value == "video/webm" || fileType.MIME.Value == "video/x-m4v" {
return true, nil
} else {
transcodePath := instance.Paths.Scene.GetTranscodePath(checksum)
return utils.FileExists(transcodePath)
}
}