mirror of https://github.com/stashapp/stash.git
Convert filesize to float64 for arm32 (#1895)
* Convert filesize to float64 for arm32
This commit is contained in:
parent
2136ced25c
commit
5de06d4b62
|
@ -73,6 +73,6 @@ type FindImagesResultType {
|
|||
"""Total megapixels of the images"""
|
||||
megapixels: Float!
|
||||
"""Total file size in bytes"""
|
||||
filesize: Int!
|
||||
filesize: Float!
|
||||
images: [Image!]!
|
||||
}
|
|
@ -123,7 +123,7 @@ type FindScenesResultType {
|
|||
"""Total duration in seconds"""
|
||||
duration: Float!
|
||||
"""Total file size in bytes"""
|
||||
filesize: Int!
|
||||
filesize: Float!
|
||||
scenes: [Scene!]!
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ func (r *queryResolver) FindScenes(ctx context.Context, sceneFilter *models.Scen
|
|||
result.Count = len(scenes)
|
||||
for _, s := range scenes {
|
||||
result.TotalDuration += s.Duration.Float64
|
||||
size, _ := strconv.Atoi(s.Size.String)
|
||||
size, _ := strconv.ParseFloat(s.Size.String, 64)
|
||||
result.TotalSize += size
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ type ImageQueryOptions struct {
|
|||
type ImageQueryResult struct {
|
||||
QueryResult
|
||||
Megapixels float64
|
||||
TotalSize int
|
||||
TotalSize float64
|
||||
|
||||
finder ImageFinder
|
||||
images []*Image
|
||||
|
|
|
@ -11,7 +11,7 @@ type SceneQueryOptions struct {
|
|||
type SceneQueryResult struct {
|
||||
QueryResult
|
||||
TotalDuration float64
|
||||
TotalSize int
|
||||
TotalSize float64
|
||||
|
||||
finder SceneFinder
|
||||
scenes []*Scene
|
||||
|
|
|
@ -330,7 +330,7 @@ func (qb *imageQueryBuilder) queryGroupedFields(options models.ImageQueryOptions
|
|||
out := struct {
|
||||
Total int
|
||||
Megapixels float64
|
||||
Size int
|
||||
Size float64
|
||||
}{}
|
||||
if err := qb.repository.queryStruct(aggregateQuery.toSQL(includeSortPagination), query.args, &out); err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -469,7 +469,7 @@ func (qb *sceneQueryBuilder) queryGroupedFields(options models.SceneQueryOptions
|
|||
out := struct {
|
||||
Total int
|
||||
Duration float64
|
||||
Size int
|
||||
Size float64
|
||||
}{}
|
||||
if err := qb.repository.queryStruct(aggregateQuery.toSQL(includeSortPagination), query.args, &out); err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue