mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Studio ID Count
This commit is contained in:
parent
c6ae43c1d6
commit
19134c892e
6 changed files with 19 additions and 0 deletions
|
|
@ -292,6 +292,8 @@ input SceneFilterType {
|
||||||
performer_count: IntCriterionInput
|
performer_count: IntCriterionInput
|
||||||
"Filter by StashID"
|
"Filter by StashID"
|
||||||
stash_id_endpoint: StashIDCriterionInput
|
stash_id_endpoint: StashIDCriterionInput
|
||||||
|
"Filter by StashID count"
|
||||||
|
stash_id_count: IntCriterionInput
|
||||||
"Filter by url"
|
"Filter by url"
|
||||||
url: StringCriterionInput
|
url: StringCriterionInput
|
||||||
"Filter by interactive"
|
"Filter by interactive"
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,8 @@ type SceneFilterType struct {
|
||||||
StashID *StringCriterionInput `json:"stash_id"`
|
StashID *StringCriterionInput `json:"stash_id"`
|
||||||
// Filter by StashID Endpoint
|
// Filter by StashID Endpoint
|
||||||
StashIDEndpoint *StashIDCriterionInput `json:"stash_id_endpoint"`
|
StashIDEndpoint *StashIDCriterionInput `json:"stash_id_endpoint"`
|
||||||
|
// Filter by StashID count
|
||||||
|
StashIDCount *IntCriterionInput `json:"stash_id_count"`
|
||||||
// Filter by url
|
// Filter by url
|
||||||
URL *StringCriterionInput `json:"url"`
|
URL *StringCriterionInput `json:"url"`
|
||||||
// Filter by interactive
|
// Filter by interactive
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,8 @@ func (qb *sceneFilterHandler) criterionHandler() criterionHandler {
|
||||||
parentIDCol: "scenes.id",
|
parentIDCol: "scenes.id",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
qb.stashIDCountCriterionHandler(sceneFilter.StashIDCount),
|
||||||
|
|
||||||
boolCriterionHandler(sceneFilter.Interactive, "video_files.interactive", qb.addVideoFilesTable),
|
boolCriterionHandler(sceneFilter.Interactive, "video_files.interactive", qb.addVideoFilesTable),
|
||||||
intCriterionHandler(sceneFilter.InteractiveSpeed, "video_files.interactive_speed", 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)
|
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 {
|
func (qb *sceneFilterHandler) performersCriterionHandler(performers *models.MultiCriterionInput) criterionHandlerFunc {
|
||||||
h := joinedMultiCriterionHandlerBuilder{
|
h := joinedMultiCriterionHandlerBuilder{
|
||||||
primaryTable: sceneTable,
|
primaryTable: sceneTable,
|
||||||
|
|
|
||||||
|
|
@ -1453,6 +1453,7 @@
|
||||||
"welcome_to_stash": "Welcome to Stash"
|
"welcome_to_stash": "Welcome to Stash"
|
||||||
},
|
},
|
||||||
"stash_id": "Stash ID",
|
"stash_id": "Stash ID",
|
||||||
|
"stash_id_count": "Stash ID Count",
|
||||||
"stash_id_endpoint": "Stash ID Endpoint",
|
"stash_id_endpoint": "Stash ID Endpoint",
|
||||||
"stash_ids": "Stash IDs",
|
"stash_ids": "Stash IDs",
|
||||||
"stashbox_search": {
|
"stashbox_search": {
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ const criterionOptions = [
|
||||||
GalleriesCriterionOption,
|
GalleriesCriterionOption,
|
||||||
createStringCriterionOption("url"),
|
createStringCriterionOption("url"),
|
||||||
StashIDCriterionOption,
|
StashIDCriterionOption,
|
||||||
|
createMandatoryNumberCriterionOption("stash_id_count"),
|
||||||
InteractiveCriterionOption,
|
InteractiveCriterionOption,
|
||||||
CaptionsCriterionOption,
|
CaptionsCriterionOption,
|
||||||
createMandatoryNumberCriterionOption("interactive_speed"),
|
createMandatoryNumberCriterionOption("interactive_speed"),
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,7 @@ export type CriterionType =
|
||||||
| "ignore_auto_tag"
|
| "ignore_auto_tag"
|
||||||
| "file_count"
|
| "file_count"
|
||||||
| "stash_id_endpoint"
|
| "stash_id_endpoint"
|
||||||
|
| "stash_id_count"
|
||||||
| "date"
|
| "date"
|
||||||
| "created_at"
|
| "created_at"
|
||||||
| "updated_at"
|
| "updated_at"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue