mirror of https://github.com/stashapp/stash.git
21 lines
436 B
Go
21 lines
436 B
Go
package movie
|
|
|
|
import (
|
|
"context"
|
|
"strconv"
|
|
|
|
"github.com/stashapp/stash/pkg/models"
|
|
)
|
|
|
|
func CountByStudioID(ctx context.Context, r models.MovieQueryer, id int, depth *int) (int, error) {
|
|
filter := &models.MovieFilterType{
|
|
Studios: &models.HierarchicalMultiCriterionInput{
|
|
Value: []string{strconv.Itoa(id)},
|
|
Modifier: models.CriterionModifierIncludes,
|
|
Depth: depth,
|
|
},
|
|
}
|
|
|
|
return r.QueryCount(ctx, filter, nil)
|
|
}
|