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