graphQL + Go

This commit is contained in:
Gykes 2026-01-30 10:24:05 -08:00
parent 241ddc09a2
commit cd3c25ccc5
3 changed files with 29 additions and 47 deletions

View file

@ -75,22 +75,19 @@ input OrientationCriterionInput {
value: [OrientationEnum!]!
}
input PHashDuplicationCriterionInput {
input DuplicationCriterionInput {
"Deprecated: Use phash field instead. Kept for backwards compatibility."
duplicated: Boolean
"Currently unimplemented"
"Currently unimplemented. Intended for phash distance matching."
distance: Int
}
input StashIDDuplicationCriterionInput {
duplicated: Boolean
}
input TitleDuplicationCriterionInput {
duplicated: Boolean
}
input URLDuplicationCriterionInput {
duplicated: Boolean
"Filter by phash duplication"
phash: Boolean
"Filter by URL duplication"
url: Boolean
"Filter by Stash ID duplication"
stash_id: Boolean
"Filter by title duplication"
title: Boolean
}
input StashIDCriterionInput {
@ -260,14 +257,8 @@ input SceneFilterType {
organized: Boolean
"Filter by o-counter"
o_counter: IntCriterionInput
"Filter Scenes that have an exact phash match available"
duplicated: PHashDuplicationCriterionInput
"Filter Scenes that have the same stash_id"
duplicated_stash_id: StashIDDuplicationCriterionInput
"Filter Scenes that have the same title"
duplicated_title: TitleDuplicationCriterionInput
"Filter Scenes that have the same URL"
duplicated_url: URLDuplicationCriterionInput
"Filter Scenes by duplication criteria"
duplicated: DuplicationCriterionInput
"Filter by resolution"
resolution: ResolutionCriterionInput
"Filter by orientation"
@ -724,8 +715,8 @@ input FileFilterType {
"Filter by modification time"
mod_time: TimestampCriterionInput
"Filter files that have an exact match available"
duplicated: PHashDuplicationCriterionInput
"Filter files by duplication criteria (only phash applies to files)"
duplicated: DuplicationCriterionInput
"find files based on hash"
hashes: [FingerprintFilterInput!]

View file

@ -26,7 +26,7 @@ type FileFilterType struct {
ParentFolder *HierarchicalMultiCriterionInput `json:"parent_folder"`
ZipFile *MultiCriterionInput `json:"zip_file"`
ModTime *TimestampCriterionInput `json:"mod_time"`
Duplicated *PHashDuplicationCriterionInput `json:"duplicated"`
Duplicated *DuplicationCriterionInput `json:"duplicated"`
Hashes []*FingerprintFilterInput `json:"hashes"`
VideoFileFilter *VideoFileFilterInput `json:"video_file_filter"`
ImageFileFilter *ImageFileFilterInput `json:"image_file_filter"`

View file

@ -2,22 +2,19 @@ package models
import "context"
type PHashDuplicationCriterionInput struct {
type DuplicationCriterionInput struct {
// Deprecated: Use Phash field instead. Kept for backwards compatibility.
Duplicated *bool `json:"duplicated"`
// Currently unimplemented
// Currently unimplemented. Intended for phash distance matching.
Distance *int `json:"distance"`
}
type StashIDDuplicationCriterionInput struct {
Duplicated *bool `json:"duplicated"`
}
type TitleDuplicationCriterionInput struct {
Duplicated *bool `json:"duplicated"`
}
type URLDuplicationCriterionInput struct {
Duplicated *bool `json:"duplicated"`
// Filter by phash duplication
Phash *bool `json:"phash"`
// Filter by URL duplication
URL *bool `json:"url"`
// Filter by Stash ID duplication
StashID *bool `json:"stash_id"`
// Filter by title duplication
Title *bool `json:"title"`
}
type SceneFilterType struct {
@ -45,14 +42,8 @@ type SceneFilterType struct {
Organized *bool `json:"organized"`
// Filter by o-counter
OCounter *IntCriterionInput `json:"o_counter"`
// Filter Scenes that have an exact phash match available
Duplicated *PHashDuplicationCriterionInput `json:"duplicated"`
// Filter Scenes that have the same stash_id
DuplicatedStashID *StashIDDuplicationCriterionInput `json:"duplicated_stash_id"`
// Filter Scenes that have the same title
DuplicatedTitle *TitleDuplicationCriterionInput `json:"duplicated_title"`
// Filter Scenes that have the same URL
DuplicatedURL *URLDuplicationCriterionInput `json:"duplicated_url"`
// Filter Scenes by duplication criteria
Duplicated *DuplicationCriterionInput `json:"duplicated"`
// Filter by resolution
Resolution *ResolutionCriterionInput `json:"resolution"`
// Filter by orientation