Studio ID Count

This commit is contained in:
Gykes 2025-11-29 00:38:12 -08:00
parent c6ae43c1d6
commit 19134c892e
6 changed files with 19 additions and 0 deletions

View file

@ -292,6 +292,8 @@ input SceneFilterType {
performer_count: IntCriterionInput
"Filter by StashID"
stash_id_endpoint: StashIDCriterionInput
"Filter by StashID count"
stash_id_count: IntCriterionInput
"Filter by url"
url: StringCriterionInput
"Filter by interactive"

View file

@ -79,6 +79,8 @@ type SceneFilterType struct {
StashID *StringCriterionInput `json:"stash_id"`
// Filter by StashID Endpoint
StashIDEndpoint *StashIDCriterionInput `json:"stash_id_endpoint"`
// Filter by StashID count
StashIDCount *IntCriterionInput `json:"stash_id_count"`
// Filter by url
URL *StringCriterionInput `json:"url"`
// Filter by interactive

View file

@ -122,6 +122,8 @@ func (qb *sceneFilterHandler) criterionHandler() criterionHandler {
parentIDCol: "scenes.id",
},
qb.stashIDCountCriterionHandler(sceneFilter.StashIDCount),
boolCriterionHandler(sceneFilter.Interactive, "video_files.interactive", qb.addVideoFilesTable),
intCriterionHandler(sceneFilter.InteractiveSpeed, "video_files.interactive_speed", qb.addVideoFilesTable),
@ -436,6 +438,16 @@ func (qb *sceneFilterHandler) tagCountCriterionHandler(tagCount *models.IntCrite
return h.handler(tagCount)
}
func (qb *sceneFilterHandler) stashIDCountCriterionHandler(stashIDCount *models.IntCriterionInput) criterionHandlerFunc {
h := countCriterionHandlerBuilder{
primaryTable: sceneTable,
joinTable: "scene_stash_ids",
primaryFK: sceneIDColumn,
}
return h.handler(stashIDCount)
}
func (qb *sceneFilterHandler) performersCriterionHandler(performers *models.MultiCriterionInput) criterionHandlerFunc {
h := joinedMultiCriterionHandlerBuilder{
primaryTable: sceneTable,

View file

@ -1453,6 +1453,7 @@
"welcome_to_stash": "Welcome to Stash"
},
"stash_id": "Stash ID",
"stash_id_count": "Stash ID Count",
"stash_id_endpoint": "Stash ID Endpoint",
"stash_ids": "Stash IDs",
"stashbox_search": {

View file

@ -132,6 +132,7 @@ const criterionOptions = [
GalleriesCriterionOption,
createStringCriterionOption("url"),
StashIDCriterionOption,
createMandatoryNumberCriterionOption("stash_id_count"),
InteractiveCriterionOption,
CaptionsCriterionOption,
createMandatoryNumberCriterionOption("interactive_speed"),

View file

@ -200,6 +200,7 @@ export type CriterionType =
| "ignore_auto_tag"
| "file_count"
| "stash_id_endpoint"
| "stash_id_count"
| "date"
| "created_at"
| "updated_at"