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

@@ -6,7 +6,9 @@ import (
"regexp"
"strings"
"github.com/stashapp/stash/pkg/image"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/scene"
)
const separatorChars = `.\-_ `
@@ -211,7 +213,7 @@ func PathToScenes(name string, paths []string, sceneReader models.SceneReader) (
filter.And = scenePathsFilter(paths)
pp := models.PerPageAll
scenes, _, err := sceneReader.Query(&filter, &models.FindFilterType{
scenes, err := scene.Query(sceneReader, &filter, &models.FindFilterType{
PerPage: &pp,
})
@@ -275,7 +277,7 @@ func PathToImages(name string, paths []string, imageReader models.ImageReader) (
filter.And = imagePathsFilter(paths)
pp := models.PerPageAll
images, _, err := imageReader.Query(&filter, &models.FindFilterType{
images, err := image.Query(imageReader, &filter, &models.FindFilterType{
PerPage: &pp,
})