2023-06-16 00:46:14 +00:00
|
|
|
package scene
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"github.com/stashapp/stash/pkg/models"
|
|
|
|
)
|
|
|
|
|
2023-09-01 00:39:29 +00:00
|
|
|
func MarkerCountByTagID(ctx context.Context, r models.SceneMarkerQueryer, id int, depth *int) (int, error) {
|
2023-06-16 00:46:14 +00:00
|
|
|
filter := &models.SceneMarkerFilterType{
|
|
|
|
Tags: &models.HierarchicalMultiCriterionInput{
|
|
|
|
Value: []string{strconv.Itoa(id)},
|
|
|
|
Modifier: models.CriterionModifierIncludes,
|
|
|
|
Depth: depth,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
return r.QueryCount(ctx, filter, nil)
|
|
|
|
}
|