Show duration and filesize in results (#1776)

* Add new query interface
* Refactor query builder
* Change Query interface
* Return duration and filesize in scene query
* Adjust UI for scene metadata
* Introduce new image query interface
* Change image Query interface
* Add megapixels and size to image query
* Update image UI

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
kermieisinthehouse
2021-10-24 17:40:13 -07:00
committed by GitHub
parent 1b411e3f43
commit 4dd56c3d82
49 changed files with 788 additions and 229 deletions

View File

@@ -962,18 +962,24 @@ func verifyGalleriesImageCount(t *testing.T, imageCountCriterion models.IntCrite
for _, gallery := range galleries {
pp := 0
_, count, err := r.Image().Query(&models.ImageFilterType{
Galleries: &models.MultiCriterionInput{
Value: []string{strconv.Itoa(gallery.ID)},
Modifier: models.CriterionModifierIncludes,
result, err := r.Image().Query(models.ImageQueryOptions{
QueryOptions: models.QueryOptions{
FindFilter: &models.FindFilterType{
PerPage: &pp,
},
Count: true,
},
ImageFilter: &models.ImageFilterType{
Galleries: &models.MultiCriterionInput{
Value: []string{strconv.Itoa(gallery.ID)},
Modifier: models.CriterionModifierIncludes,
},
},
}, &models.FindFilterType{
PerPage: &pp,
})
if err != nil {
return err
}
verifyInt(t, count, imageCountCriterion)
verifyInt(t, result.Count, imageCountCriterion)
}
return nil