Remove streaming resolutions over max configured (#1187)

This commit is contained in:
WithoutPants
2021-03-11 12:51:42 +11:00
committed by GitHub
parent b647a75151
commit b3966b3c76
4 changed files with 69 additions and 84 deletions

View File

@@ -84,6 +84,14 @@ func (s Scene) GetHash(hashAlgorithm HashAlgorithm) string {
panic("unknown hash algorithm")
}
func (s Scene) GetMinResolution() int64 {
if s.Width.Int64 < s.Height.Int64 {
return s.Width.Int64
}
return s.Height.Int64
}
// SceneFileType represents the file metadata for a scene.
type SceneFileType struct {
Size *string `graphql:"size" json:"size"`