diff --git a/graphql/schema/enums.graphqls b/graphql/schema/enums.graphqls index b98b087c..166ca94a 100644 --- a/graphql/schema/enums.graphqls +++ b/graphql/schema/enums.graphqls @@ -98,7 +98,7 @@ enum Language { zu } -enum Video3d { +enum Video3D { V3D V3DSBS V3DOU diff --git a/graphql/schema/models.graphqls b/graphql/schema/models.graphqls index 296bb3a7..0c5d8a86 100644 --- a/graphql/schema/models.graphqls +++ b/graphql/schema/models.graphqls @@ -57,7 +57,7 @@ type TorrentContent { videoResolution: VideoResolution videoSource: VideoSource videoCodec: VideoCodec - video3d: Video3d + video3d: Video3D videoModifier: VideoModifier releaseGroup: String seeders: Int diff --git a/internal/classifier/classification/result.go b/internal/classifier/classification/result.go index a1e70a15..f919e5a3 100644 --- a/internal/classifier/classification/result.go +++ b/internal/classifier/classification/result.go @@ -36,7 +36,7 @@ type ContentAttributes struct { VideoResolution model.NullVideoResolution VideoSource model.NullVideoSource VideoCodec model.NullVideoCodec - Video3d model.NullVideo3d + Video3D model.NullVideo3D VideoModifier model.NullVideoModifier ReleaseGroup model.NullString } @@ -67,8 +67,8 @@ func (a *ContentAttributes) Merge(other ContentAttributes) { if !a.VideoCodec.Valid { a.VideoCodec = other.VideoCodec } - if !a.Video3d.Valid { - a.Video3d = other.Video3d + if !a.Video3D.Valid { + a.Video3D = other.Video3D } if !a.VideoModifier.Valid { a.VideoModifier = other.VideoModifier @@ -94,8 +94,8 @@ func (a *ContentAttributes) ApplyHint(h model.TorrentHint) { if h.VideoCodec.Valid { a.VideoCodec = h.VideoCodec } - if h.Video3d.Valid { - a.Video3d = h.Video3d + if h.Video3D.Valid { + a.Video3D = h.Video3D } if h.VideoModifier.Valid { a.VideoModifier = h.VideoModifier @@ -109,6 +109,6 @@ func (a *ContentAttributes) InferVideoAttributes(input string) { a.VideoResolution = model.InferVideoResolution(input) a.VideoSource = model.InferVideoSource(input) a.VideoCodec, a.ReleaseGroup = model.InferVideoCodecAndReleaseGroup(input) - a.Video3d = model.InferVideo3d(input) + a.Video3D = model.InferVideo3D(input) a.VideoModifier = model.InferVideoModifier(input) } diff --git a/internal/classifier/mocks/LocalSearch.go b/internal/classifier/mocks/LocalSearch.go index 5fdaefdd..ff08f191 100644 --- a/internal/classifier/mocks/LocalSearch.go +++ b/internal/classifier/mocks/LocalSearch.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.2. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package classifier_mocks diff --git a/internal/database/dao/torrent_contents.gen.go b/internal/database/dao/torrent_contents.gen.go index dd868c5a..9f59ab77 100644 --- a/internal/database/dao/torrent_contents.gen.go +++ b/internal/database/dao/torrent_contents.gen.go @@ -37,7 +37,7 @@ func newTorrentContent(db *gorm.DB, opts ...gen.DOOption) torrentContent { _torrentContent.VideoResolution = field.NewField(tableName, "video_resolution") _torrentContent.VideoSource = field.NewField(tableName, "video_source") _torrentContent.VideoCodec = field.NewField(tableName, "video_codec") - _torrentContent.Video3d = field.NewField(tableName, "video_3d") + _torrentContent.Video3D = field.NewField(tableName, "video_3d") _torrentContent.VideoModifier = field.NewField(tableName, "video_modifier") _torrentContent.ReleaseGroup = field.NewField(tableName, "release_group") _torrentContent.CreatedAt = field.NewTime(tableName, "created_at") @@ -148,7 +148,7 @@ type torrentContent struct { VideoResolution field.Field VideoSource field.Field VideoCodec field.Field - Video3d field.Field + Video3D field.Field VideoModifier field.Field ReleaseGroup field.Field CreatedAt field.Time @@ -188,7 +188,7 @@ func (t *torrentContent) updateTableName(table string) *torrentContent { t.VideoResolution = field.NewField(table, "video_resolution") t.VideoSource = field.NewField(table, "video_source") t.VideoCodec = field.NewField(table, "video_codec") - t.Video3d = field.NewField(table, "video_3d") + t.Video3D = field.NewField(table, "video_3d") t.VideoModifier = field.NewField(table, "video_modifier") t.ReleaseGroup = field.NewField(table, "release_group") t.CreatedAt = field.NewTime(table, "created_at") @@ -226,7 +226,7 @@ func (t *torrentContent) fillFieldMap() { t.fieldMap["video_resolution"] = t.VideoResolution t.fieldMap["video_source"] = t.VideoSource t.fieldMap["video_codec"] = t.VideoCodec - t.fieldMap["video_3d"] = t.Video3d + t.fieldMap["video_3d"] = t.Video3D t.fieldMap["video_modifier"] = t.VideoModifier t.fieldMap["release_group"] = t.ReleaseGroup t.fieldMap["created_at"] = t.CreatedAt diff --git a/internal/database/dao/torrent_hints.gen.go b/internal/database/dao/torrent_hints.gen.go index d5bc0c19..26aaa00c 100644 --- a/internal/database/dao/torrent_hints.gen.go +++ b/internal/database/dao/torrent_hints.gen.go @@ -38,7 +38,7 @@ func newTorrentHint(db *gorm.DB, opts ...gen.DOOption) torrentHint { _torrentHint.VideoResolution = field.NewField(tableName, "video_resolution") _torrentHint.VideoSource = field.NewField(tableName, "video_source") _torrentHint.VideoCodec = field.NewField(tableName, "video_codec") - _torrentHint.Video3d = field.NewField(tableName, "video_3d") + _torrentHint.Video3D = field.NewField(tableName, "video_3d") _torrentHint.VideoModifier = field.NewField(tableName, "video_modifier") _torrentHint.ReleaseGroup = field.NewField(tableName, "release_group") _torrentHint.CreatedAt = field.NewTime(tableName, "created_at") @@ -64,7 +64,7 @@ type torrentHint struct { VideoResolution field.Field VideoSource field.Field VideoCodec field.Field - Video3d field.Field + Video3D field.Field VideoModifier field.Field ReleaseGroup field.Field CreatedAt field.Time @@ -96,7 +96,7 @@ func (t *torrentHint) updateTableName(table string) *torrentHint { t.VideoResolution = field.NewField(table, "video_resolution") t.VideoSource = field.NewField(table, "video_source") t.VideoCodec = field.NewField(table, "video_codec") - t.Video3d = field.NewField(table, "video_3d") + t.Video3D = field.NewField(table, "video_3d") t.VideoModifier = field.NewField(table, "video_modifier") t.ReleaseGroup = field.NewField(table, "release_group") t.CreatedAt = field.NewTime(table, "created_at") @@ -129,7 +129,7 @@ func (t *torrentHint) fillFieldMap() { t.fieldMap["video_resolution"] = t.VideoResolution t.fieldMap["video_source"] = t.VideoSource t.fieldMap["video_codec"] = t.VideoCodec - t.fieldMap["video_3d"] = t.Video3d + t.fieldMap["video_3d"] = t.Video3D t.fieldMap["video_modifier"] = t.VideoModifier t.fieldMap["release_group"] = t.ReleaseGroup t.fieldMap["created_at"] = t.CreatedAt diff --git a/internal/database/gen/gen.go b/internal/database/gen/gen.go index 6bb26a75..434561e0 100644 --- a/internal/database/gen/gen.go +++ b/internal/database/gen/gen.go @@ -326,7 +326,7 @@ func BuildGenerator(db *gorm.DB) *gen.Generator { gen.FieldType("video_resolution", "NullVideoResolution"), gen.FieldType("video_source", "NullVideoSource"), gen.FieldType("video_codec", "NullVideoCodec"), - gen.FieldType("video_3d", "NullVideo3d"), + gen.FieldType("video_3d", "NullVideo3D"), gen.FieldType("video_modifier", "NullVideoModifier"), gen.FieldType("tsv", "fts.Tsvector"), createdAtReadOnly, diff --git a/internal/database/search/criteria_torrent_content_attribute.go b/internal/database/search/criteria_torrent_content_attribute.go index 4974cea5..e6df4c4b 100644 --- a/internal/database/search/criteria_torrent_content_attribute.go +++ b/internal/database/search/criteria_torrent_content_attribute.go @@ -11,7 +11,7 @@ import ( var VideoResolutionCriteria = torrentContentAttributeCriteria[model.VideoResolution](videoResolutionField) -var Video3dCriteria = torrentContentAttributeCriteria[model.Video3d](video3dField) +var Video3DCriteria = torrentContentAttributeCriteria[model.Video3D](video3dField) func torrentContentAttributeCriteria[T attribute](getFld func(*dao.Query) field.Field) func(...T) query.Criteria { return func(values ...T) query.Criteria { diff --git a/internal/database/search/facet_torrent_content_video_3d.go b/internal/database/search/facet_torrent_content_video_3d.go index 2cc8eb48..dcbc0cff 100644 --- a/internal/database/search/facet_torrent_content_video_3d.go +++ b/internal/database/search/facet_torrent_content_video_3d.go @@ -7,33 +7,33 @@ import ( "gorm.io/gen/field" ) -const Video3dFacetKey = "video_3d" +const Video3DFacetKey = "video_3d" func video3dField(q *dao.Query) field.Field { - return q.TorrentContent.Video3d + return q.TorrentContent.Video3D } -func Video3dFacet(options ...query.FacetOption) query.Facet { - return video3dFacet{torrentContentAttributeFacet[model.Video3d]{ +func Video3DFacet(options ...query.FacetOption) query.Facet { + return video3dFacet{torrentContentAttributeFacet[model.Video3D]{ FacetConfig: query.NewFacetConfig( append([]query.FacetOption{ - query.FacetHasKey(Video3dFacetKey), + query.FacetHasKey(Video3DFacetKey), query.FacetHasLabel("Video 3D"), query.FacetUsesOrLogic(), query.FacetTriggersCte(), }, options...)..., ), field: video3dField, - parse: model.ParseVideo3d, + parse: model.ParseVideo3D, }} } type video3dFacet struct { - torrentContentAttributeFacet[model.Video3d] + torrentContentAttributeFacet[model.Video3D] } func (f video3dFacet) Values(query.FacetContext) (map[string]string, error) { - v3ds := model.Video3dValues() + v3ds := model.Video3DValues() values := make(map[string]string, len(v3ds)) for _, vr := range v3ds { values[vr.String()] = vr.Label() diff --git a/internal/gql/enums/enums.go b/internal/gql/enums/enums.go index 78cb9d3d..96b98f75 100644 --- a/internal/gql/enums/enums.go +++ b/internal/gql/enums/enums.go @@ -23,7 +23,7 @@ var Enums = []enum{ newEnum("FileType", model.FileTypeNames()), newEnum("FilesStatus", model.FilesStatusNames()), newEnum("Language", model.LanguageValueStrings()), - newEnum("Video3d", model.Video3dNames()), + newEnum("Video3D", model.Video3DNames()), newEnum("VideoCodec", model.VideoCodecNames()), newEnum("VideoModifier", model.VideoModifierNames()), newEnum("VideoResolution", model.VideoResolutionNames()), diff --git a/internal/gql/gql.gen.go b/internal/gql/gql.gen.go index 0767a4e5..3478f7b9 100644 --- a/internal/gql/gql.gen.go +++ b/internal/gql/gql.gen.go @@ -287,7 +287,7 @@ type ComplexityRoot struct { Title func(childComplexity int) int Torrent func(childComplexity int) int UpdatedAt func(childComplexity int) int - Video3d func(childComplexity int) int + Video3D func(childComplexity int) int VideoCodec func(childComplexity int) int VideoModifier func(childComplexity int) int VideoResolution func(childComplexity int) int @@ -1509,11 +1509,11 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.TorrentContent.UpdatedAt(childComplexity), true case "TorrentContent.video3d": - if e.complexity.TorrentContent.Video3d == nil { + if e.complexity.TorrentContent.Video3D == nil { break } - return e.complexity.TorrentContent.Video3d(childComplexity), true + return e.complexity.TorrentContent.Video3D(childComplexity), true case "TorrentContent.videoCodec": if e.complexity.TorrentContent.VideoCodec == nil { @@ -2316,7 +2316,7 @@ enum Language { zu } -enum Video3d { +enum Video3D { V3D V3DSBS V3DOU @@ -2493,7 +2493,7 @@ type TorrentContent { videoResolution: VideoResolution videoSource: VideoSource videoCodec: VideoCodec - video3d: Video3d + video3d: Video3D videoModifier: VideoModifier releaseGroup: String seeders: Int @@ -10082,7 +10082,7 @@ func (ec *executionContext) _TorrentContent_video3d(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Video3d, nil + return obj.Video3D, nil }) if err != nil { ec.Error(ctx, err) @@ -10091,9 +10091,9 @@ func (ec *executionContext) _TorrentContent_video3d(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(model.NullVideo3d) + res := resTmp.(model.NullVideo3D) fc.Result = res - return ec.marshalOVideo3d2githubᚗcomᚋbitmagnetᚑioᚋbitmagnetᚋinternalᚋmodelᚐNullVideo3d(ctx, field.Selections, res) + return ec.marshalOVideo3D2githubᚗcomᚋbitmagnetᚑioᚋbitmagnetᚋinternalᚋmodelᚐNullVideo3D(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_TorrentContent_video3d(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -10103,7 +10103,7 @@ func (ec *executionContext) fieldContext_TorrentContent_video3d(_ context.Contex IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Video3d does not have child fields") + return nil, errors.New("field of type Video3D does not have child fields") }, } return fc, nil @@ -23027,13 +23027,13 @@ func (ec *executionContext) unmarshalOTorrentTagFacetInput2ᚖgithubᚗcomᚋbit return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) unmarshalOVideo3d2githubᚗcomᚋbitmagnetᚑioᚋbitmagnetᚋinternalᚋmodelᚐNullVideo3d(ctx context.Context, v interface{}) (model.NullVideo3d, error) { - var res model.NullVideo3d +func (ec *executionContext) unmarshalOVideo3D2githubᚗcomᚋbitmagnetᚑioᚋbitmagnetᚋinternalᚋmodelᚐNullVideo3D(ctx context.Context, v interface{}) (model.NullVideo3D, error) { + var res model.NullVideo3D err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOVideo3d2githubᚗcomᚋbitmagnetᚑioᚋbitmagnetᚋinternalᚋmodelᚐNullVideo3d(ctx context.Context, sel ast.SelectionSet, v model.NullVideo3d) graphql.Marshaler { +func (ec *executionContext) marshalOVideo3D2githubᚗcomᚋbitmagnetᚑioᚋbitmagnetᚋinternalᚋmodelᚐNullVideo3D(ctx context.Context, sel ast.SelectionSet, v model.NullVideo3D) graphql.Marshaler { return v } diff --git a/internal/gql/gqlgen.yml b/internal/gql/gqlgen.yml index 63f3e766..8c4e7336 100644 --- a/internal/gql/gqlgen.yml +++ b/internal/gql/gqlgen.yml @@ -142,10 +142,10 @@ models: model: - github.com/bitmagnet-io/bitmagnet/internal/model.VideoCodec - github.com/bitmagnet-io/bitmagnet/internal/model.NullVideoCodec - Video3d: + Video3D: model: - - github.com/bitmagnet-io/bitmagnet/internal/model.Video3d - - github.com/bitmagnet-io/bitmagnet/internal/model.NullVideo3d + - github.com/bitmagnet-io/bitmagnet/internal/model.Video3D + - github.com/bitmagnet-io/bitmagnet/internal/model.NullVideo3D VideoModifier: model: - github.com/bitmagnet-io/bitmagnet/internal/model.VideoModifier diff --git a/internal/gql/gqlmodel/torrent_content.go b/internal/gql/gqlmodel/torrent_content.go index f9a86921..21ae873f 100644 --- a/internal/gql/gqlmodel/torrent_content.go +++ b/internal/gql/gqlmodel/torrent_content.go @@ -28,7 +28,7 @@ type TorrentContent struct { VideoResolution model.NullVideoResolution VideoSource model.NullVideoSource VideoCodec model.NullVideoCodec - Video3d model.NullVideo3d + Video3D model.NullVideo3D VideoModifier model.NullVideoModifier ReleaseGroup model.NullString SearchString string @@ -57,7 +57,7 @@ func NewTorrentContentFromResultItem(item search.TorrentContentResultItem) Torre VideoResolution: item.VideoResolution, VideoSource: item.VideoSource, VideoCodec: item.VideoCodec, - Video3d: item.Video3d, + Video3D: item.Video3D, VideoModifier: item.VideoModifier, ReleaseGroup: item.ReleaseGroup, Seeders: item.Seeders, diff --git a/internal/importer/importer.go b/internal/importer/importer.go index 07eca3a3..22b788a6 100644 --- a/internal/importer/importer.go +++ b/internal/importer/importer.go @@ -33,7 +33,7 @@ type Item struct { VideoResolution model.NullVideoResolution VideoSource model.NullVideoSource VideoCodec model.NullVideoCodec - Video3d model.NullVideo3d + Video3D model.NullVideo3D VideoModifier model.NullVideoModifier ReleaseGroup model.NullString PublishedAt time.Time @@ -275,7 +275,7 @@ func createTorrentModel(info Info, item Item) model.Torrent { VideoResolution: item.VideoResolution, VideoSource: item.VideoSource, VideoCodec: item.VideoCodec, - Video3d: item.Video3d, + Video3D: item.Video3D, VideoModifier: item.VideoModifier, ReleaseGroup: item.ReleaseGroup, } diff --git a/internal/model/torrent_contents.gen.go b/internal/model/torrent_contents.gen.go index 1932918c..6ffd6fec 100644 --- a/internal/model/torrent_contents.gen.go +++ b/internal/model/torrent_contents.gen.go @@ -25,7 +25,7 @@ type TorrentContent struct { VideoResolution NullVideoResolution `gorm:"column:video_resolution" json:"videoResolution"` VideoSource NullVideoSource `gorm:"column:video_source" json:"videoSource"` VideoCodec NullVideoCodec `gorm:"column:video_codec" json:"videoCodec"` - Video3d NullVideo3d `gorm:"column:video_3d" json:"video3D"` + Video3D NullVideo3D `gorm:"column:video_3d" json:"video3D"` VideoModifier NullVideoModifier `gorm:"column:video_modifier" json:"videoModifier"` ReleaseGroup NullString `gorm:"column:release_group" json:"releaseGroup"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` diff --git a/internal/model/torrent_contents.go b/internal/model/torrent_contents.go index f8b48edd..d9c159df 100644 --- a/internal/model/torrent_contents.go +++ b/internal/model/torrent_contents.go @@ -69,7 +69,7 @@ func (tc *TorrentContent) UpdateTsv() { if tc.VideoCodec.Valid { tsv.AddText(tc.VideoCodec.VideoCodec.String(), fts.TsvectorWeightC) } - if tc.Video3d.Valid { + if tc.Video3D.Valid { tsv.AddText("3D", fts.TsvectorWeightC) } if tc.VideoModifier.Valid { diff --git a/internal/model/torrent_hints.gen.go b/internal/model/torrent_hints.gen.go index ef985a66..efbe67db 100644 --- a/internal/model/torrent_hints.gen.go +++ b/internal/model/torrent_hints.gen.go @@ -25,7 +25,7 @@ type TorrentHint struct { VideoResolution NullVideoResolution `gorm:"column:video_resolution" json:"videoResolution"` VideoSource NullVideoSource `gorm:"column:video_source" json:"videoSource"` VideoCodec NullVideoCodec `gorm:"column:video_codec" json:"videoCodec"` - Video3d NullVideo3d `gorm:"column:video_3d" json:"video3D"` + Video3D NullVideo3D `gorm:"column:video_3d" json:"video3D"` VideoModifier NullVideoModifier `gorm:"column:video_modifier" json:"videoModifier"` ReleaseGroup NullString `gorm:"column:release_group" json:"releaseGroup"` CreatedAt time.Time `gorm:"column:created_at;not null;<-:create" json:"createdAt"` diff --git a/internal/model/video_3d.go b/internal/model/video_3d.go index 4f0da0c0..07c66d23 100644 --- a/internal/model/video_3d.go +++ b/internal/model/video_3d.go @@ -4,21 +4,21 @@ import ( "github.com/bitmagnet-io/bitmagnet/internal/keywords" ) -// Video3d represents the 3D type of a video +// Video3D represents the 3D type of a video // ENUM(V3D, V3DSBS, V3DOU) -type Video3d string +type Video3D string -func (v Video3d) Label() string { +func (v Video3D) Label() string { return v.String()[1:] } -var video3dRegex = keywords.MustNewRegexFromKeywords(namesToLower(removeEnumPrefixes(Video3dNames()...)...)...) +var video3dRegex = keywords.MustNewRegexFromKeywords(namesToLower(removeEnumPrefixes(Video3DNames()...)...)...) -func InferVideo3d(input string) NullVideo3d { +func InferVideo3D(input string) NullVideo3D { if match := video3dRegex.FindStringSubmatch(input); match != nil { - if parsed, parseErr := ParseVideo3d("V" + match[1]); parseErr == nil { - return NewNullVideo3d(parsed) + if parsed, parseErr := ParseVideo3D("V" + match[1]); parseErr == nil { + return NewNullVideo3D(parsed) } } - return NullVideo3d{} + return NullVideo3D{} } diff --git a/internal/model/video_3d_enum.go b/internal/model/video_3d_enum.go index ea3b86a2..1e2c1bed 100644 --- a/internal/model/video_3d_enum.go +++ b/internal/model/video_3d_enum.go @@ -16,76 +16,76 @@ import ( ) const ( - Video3dV3D Video3d = "V3D" - Video3dV3DSBS Video3d = "V3DSBS" - Video3dV3DOU Video3d = "V3DOU" + Video3DV3D Video3D = "V3D" + Video3DV3DSBS Video3D = "V3DSBS" + Video3DV3DOU Video3D = "V3DOU" ) -var ErrInvalidVideo3d = fmt.Errorf("not a valid Video3d, try [%s]", strings.Join(_Video3dNames, ", ")) +var ErrInvalidVideo3D = fmt.Errorf("not a valid Video3D, try [%s]", strings.Join(_Video3DNames, ", ")) -var _Video3dNames = []string{ - string(Video3dV3D), - string(Video3dV3DSBS), - string(Video3dV3DOU), +var _Video3DNames = []string{ + string(Video3DV3D), + string(Video3DV3DSBS), + string(Video3DV3DOU), } -// Video3dNames returns a list of possible string values of Video3d. -func Video3dNames() []string { - tmp := make([]string, len(_Video3dNames)) - copy(tmp, _Video3dNames) +// Video3DNames returns a list of possible string values of Video3D. +func Video3DNames() []string { + tmp := make([]string, len(_Video3DNames)) + copy(tmp, _Video3DNames) return tmp } -// Video3dValues returns a list of the values for Video3d -func Video3dValues() []Video3d { - return []Video3d{ - Video3dV3D, - Video3dV3DSBS, - Video3dV3DOU, +// Video3DValues returns a list of the values for Video3D +func Video3DValues() []Video3D { + return []Video3D{ + Video3DV3D, + Video3DV3DSBS, + Video3DV3DOU, } } // String implements the Stringer interface. -func (x Video3d) String() string { +func (x Video3D) String() string { return string(x) } // IsValid provides a quick way to determine if the typed value is // part of the allowed enumerated values -func (x Video3d) IsValid() bool { - _, err := ParseVideo3d(string(x)) +func (x Video3D) IsValid() bool { + _, err := ParseVideo3D(string(x)) return err == nil } -var _Video3dValue = map[string]Video3d{ - "V3D": Video3dV3D, - "v3d": Video3dV3D, - "V3DSBS": Video3dV3DSBS, - "v3dsbs": Video3dV3DSBS, - "V3DOU": Video3dV3DOU, - "v3dou": Video3dV3DOU, +var _Video3DValue = map[string]Video3D{ + "V3D": Video3DV3D, + "v3d": Video3DV3D, + "V3DSBS": Video3DV3DSBS, + "v3dsbs": Video3DV3DSBS, + "V3DOU": Video3DV3DOU, + "v3dou": Video3DV3DOU, } -// ParseVideo3d attempts to convert a string to a Video3d. -func ParseVideo3d(name string) (Video3d, error) { - if x, ok := _Video3dValue[name]; ok { +// ParseVideo3D attempts to convert a string to a Video3D. +func ParseVideo3D(name string) (Video3D, error) { + if x, ok := _Video3DValue[name]; ok { return x, nil } // Case insensitive parse, do a separate lookup to prevent unnecessary cost of lowercasing a string if we don't need to. - if x, ok := _Video3dValue[strings.ToLower(name)]; ok { + if x, ok := _Video3DValue[strings.ToLower(name)]; ok { return x, nil } - return Video3d(""), fmt.Errorf("%s is %w", name, ErrInvalidVideo3d) + return Video3D(""), fmt.Errorf("%s is %w", name, ErrInvalidVideo3D) } // MarshalText implements the text marshaller method. -func (x Video3d) MarshalText() ([]byte, error) { +func (x Video3D) MarshalText() ([]byte, error) { return []byte(string(x)), nil } // UnmarshalText implements the text unmarshaller method. -func (x *Video3d) UnmarshalText(text []byte) error { - tmp, err := ParseVideo3d(string(text)) +func (x *Video3D) UnmarshalText(text []byte) error { + tmp, err := ParseVideo3D(string(text)) if err != nil { return err } @@ -93,12 +93,12 @@ func (x *Video3d) UnmarshalText(text []byte) error { return nil } -var errVideo3dNilPtr = errors.New("value pointer is nil") // one per type for package clashes +var errVideo3DNilPtr = errors.New("value pointer is nil") // one per type for package clashes // Scan implements the Scanner interface. -func (x *Video3d) Scan(value interface{}) (err error) { +func (x *Video3D) Scan(value interface{}) (err error) { if value == nil { - *x = Video3d("") + *x = Video3D("") return } @@ -106,76 +106,76 @@ func (x *Video3d) Scan(value interface{}) (err error) { // driver.Value values at the top of the list for expediency switch v := value.(type) { case string: - *x, err = ParseVideo3d(v) + *x, err = ParseVideo3D(v) case []byte: - *x, err = ParseVideo3d(string(v)) - case Video3d: + *x, err = ParseVideo3D(string(v)) + case Video3D: *x = v - case *Video3d: + case *Video3D: if v == nil { - return errVideo3dNilPtr + return errVideo3DNilPtr } *x = *v case *string: if v == nil { - return errVideo3dNilPtr + return errVideo3DNilPtr } - *x, err = ParseVideo3d(*v) + *x, err = ParseVideo3D(*v) default: - return errors.New("invalid type for Video3d") + return errors.New("invalid type for Video3D") } return } // Value implements the driver Valuer interface. -func (x Video3d) Value() (driver.Value, error) { +func (x Video3D) Value() (driver.Value, error) { return x.String(), nil } -type NullVideo3d struct { - Video3d Video3d +type NullVideo3D struct { + Video3D Video3D Valid bool Set bool } -func NewNullVideo3d(val interface{}) (x NullVideo3d) { +func NewNullVideo3D(val interface{}) (x NullVideo3D) { err := x.Scan(val) // yes, we ignore this error, it will just be an invalid value. _ = err // make any errcheck linters happy return } // Scan implements the Scanner interface. -func (x *NullVideo3d) Scan(value interface{}) (err error) { +func (x *NullVideo3D) Scan(value interface{}) (err error) { if value == nil { - x.Video3d, x.Valid = Video3d(""), false + x.Video3D, x.Valid = Video3D(""), false return } - err = x.Video3d.Scan(value) + err = x.Video3D.Scan(value) x.Valid = (err == nil) return } // Value implements the driver Valuer interface. -func (x NullVideo3d) Value() (driver.Value, error) { +func (x NullVideo3D) Value() (driver.Value, error) { if !x.Valid { return nil, nil } - return x.Video3d.String(), nil + return x.Video3D.String(), nil } -// MarshalJSON correctly serializes a NullVideo3d to JSON. -func (n NullVideo3d) MarshalJSON() ([]byte, error) { +// MarshalJSON correctly serializes a NullVideo3D to JSON. +func (n NullVideo3D) MarshalJSON() ([]byte, error) { const nullStr = "null" if n.Valid { - return json.Marshal(n.Video3d) + return json.Marshal(n.Video3D) } return []byte(nullStr), nil } -// UnmarshalJSON correctly deserializes a NullVideo3d from JSON. -func (n *NullVideo3d) UnmarshalJSON(b []byte) error { +// UnmarshalJSON correctly deserializes a NullVideo3D from JSON. +func (n *NullVideo3D) UnmarshalJSON(b []byte) error { n.Set = true var x interface{} err := json.Unmarshal(b, &x) @@ -186,16 +186,16 @@ func (n *NullVideo3d) UnmarshalJSON(b []byte) error { return err } -// MarshalGQL correctly serializes a NullVideo3d to GraphQL. -func (n NullVideo3d) MarshalGQL(w io.Writer) { +// MarshalGQL correctly serializes a NullVideo3D to GraphQL. +func (n NullVideo3D) MarshalGQL(w io.Writer) { bytes, err := json.Marshal(n) if err == nil { _, _ = w.Write(bytes) } } -// UnmarshalGQL correctly deserializes a NullVideo3d from GraphQL. -func (n *NullVideo3d) UnmarshalGQL(v any) error { +// UnmarshalGQL correctly deserializes a NullVideo3D from GraphQL. +func (n *NullVideo3D) UnmarshalGQL(v any) error { if v == nil { return nil } diff --git a/internal/processor/processor.go b/internal/processor/processor.go index 1611a2b9..a411e620 100644 --- a/internal/processor/processor.go +++ b/internal/processor/processor.go @@ -173,7 +173,7 @@ func newTorrentContent(t model.Torrent, c classification.Result) model.TorrentCo VideoResolution: c.VideoResolution, VideoSource: c.VideoSource, VideoCodec: c.VideoCodec, - Video3d: c.Video3d, + Video3D: c.Video3D, VideoModifier: c.VideoModifier, ReleaseGroup: c.ReleaseGroup, Size: t.Size, diff --git a/internal/protocol/dht/ktable/mocks/Table.go b/internal/protocol/dht/ktable/mocks/Table.go index b2c7c8bd..cbf4574c 100644 --- a/internal/protocol/dht/ktable/mocks/Table.go +++ b/internal/protocol/dht/ktable/mocks/Table.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.2. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package ktable_mocks diff --git a/internal/protocol/dht/responder/mocks/Limiter.go b/internal/protocol/dht/responder/mocks/Limiter.go index 36861a28..1a279096 100644 --- a/internal/protocol/dht/responder/mocks/Limiter.go +++ b/internal/protocol/dht/responder/mocks/Limiter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.2. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package responder_mocks diff --git a/internal/tmdb/mocks/Client.go b/internal/tmdb/mocks/Client.go index 4b3ef3d6..0dcd8a55 100644 --- a/internal/tmdb/mocks/Client.go +++ b/internal/tmdb/mocks/Client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.46.2. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package tmdb_mocks diff --git a/internal/torznab/adapter/search.go b/internal/torznab/adapter/search.go index e300f344..23ab7155 100644 --- a/internal/torznab/adapter/search.go +++ b/internal/torznab/adapter/search.go @@ -79,10 +79,10 @@ func (a adapter) searchRequestOptions(r torznab.SearchRequest) ([]query.Option, } else if torznab.CategoryMoviesUHD.ID == cat { catCriteria = append(catCriteria, search.VideoResolutionCriteria(model.VideoResolutionV2160p)) } else if torznab.CategoryMovies3D.ID == cat { - catCriteria = append(catCriteria, search.Video3dCriteria( - model.Video3dV3D, - model.Video3dV3DSBS, - model.Video3dV3DOU, + catCriteria = append(catCriteria, search.Video3DCriteria( + model.Video3DV3D, + model.Video3DV3DSBS, + model.Video3DV3DOU, )) } } else if torznab.CategoryTV.Has(cat) { diff --git a/webui/src/app/graphql/generated/index.ts b/webui/src/app/graphql/generated/index.ts index cdfde971..5edd5963 100644 --- a/webui/src/app/graphql/generated/index.ts +++ b/webui/src/app/graphql/generated/index.ts @@ -497,7 +497,7 @@ export type TorrentContent = { title: Scalars['String']['output']; torrent: Torrent; updatedAt: Scalars['DateTime']['output']; - video3d?: Maybe; + video3d?: Maybe; videoCodec?: Maybe; videoModifier?: Maybe; videoResolution?: Maybe; @@ -762,7 +762,7 @@ export type TorrentTagFacetInput = { logic?: InputMaybe; }; -export type Video3d = +export type Video3D = | 'V3D' | 'V3DOU' | 'V3DSBS'; @@ -855,9 +855,9 @@ export type QueueJobsQueryResultFragment = { __typename?: 'QueueJobsQueryResult' export type TorrentFragment = { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }; -export type TorrentContentFragment = { __typename?: 'TorrentContent', id: string, infoHash: string, contentType?: ContentType | null, title: string, video3d?: Video3d | null, videoCodec?: VideoCodec | null, videoModifier?: VideoModifier | null, videoResolution?: VideoResolution | null, videoSource?: VideoSource | null, seeders?: number | null, leechers?: number | null, publishedAt: string, createdAt: string, updatedAt: string, torrent: { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }, content?: { __typename?: 'Content', type: ContentType, source: string, id: string, title: string, releaseDate?: string | null, releaseYear?: number | null, overview?: string | null, runtime?: number | null, voteAverage?: number | null, voteCount?: number | null, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string }, originalLanguage?: { __typename?: 'LanguageInfo', id: string, name: string } | null, attributes: Array<{ __typename?: 'ContentAttribute', source: string, key: string, value: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, collections: Array<{ __typename?: 'ContentCollection', type: string, source: string, id: string, name: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, externalLinks: Array<{ __typename?: 'ExternalLink', url: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }> } | null, languages?: Array<{ __typename?: 'LanguageInfo', id: string, name: string }> | null, episodes?: { __typename?: 'Episodes', label: string, seasons: Array<{ __typename?: 'Season', season: number, episodes?: Array | null }> } | null }; +export type TorrentContentFragment = { __typename?: 'TorrentContent', id: string, infoHash: string, contentType?: ContentType | null, title: string, video3d?: Video3D | null, videoCodec?: VideoCodec | null, videoModifier?: VideoModifier | null, videoResolution?: VideoResolution | null, videoSource?: VideoSource | null, seeders?: number | null, leechers?: number | null, publishedAt: string, createdAt: string, updatedAt: string, torrent: { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }, content?: { __typename?: 'Content', type: ContentType, source: string, id: string, title: string, releaseDate?: string | null, releaseYear?: number | null, overview?: string | null, runtime?: number | null, voteAverage?: number | null, voteCount?: number | null, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string }, originalLanguage?: { __typename?: 'LanguageInfo', id: string, name: string } | null, attributes: Array<{ __typename?: 'ContentAttribute', source: string, key: string, value: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, collections: Array<{ __typename?: 'ContentCollection', type: string, source: string, id: string, name: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, externalLinks: Array<{ __typename?: 'ExternalLink', url: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }> } | null, languages?: Array<{ __typename?: 'LanguageInfo', id: string, name: string }> | null, episodes?: { __typename?: 'Episodes', label: string, seasons: Array<{ __typename?: 'Season', season: number, episodes?: Array | null }> } | null }; -export type TorrentContentSearchResultFragment = { __typename?: 'TorrentContentSearchResult', totalCount: number, totalCountIsEstimate: boolean, hasNextPage?: boolean | null, items: Array<{ __typename?: 'TorrentContent', id: string, infoHash: string, contentType?: ContentType | null, title: string, video3d?: Video3d | null, videoCodec?: VideoCodec | null, videoModifier?: VideoModifier | null, videoResolution?: VideoResolution | null, videoSource?: VideoSource | null, seeders?: number | null, leechers?: number | null, publishedAt: string, createdAt: string, updatedAt: string, torrent: { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }, content?: { __typename?: 'Content', type: ContentType, source: string, id: string, title: string, releaseDate?: string | null, releaseYear?: number | null, overview?: string | null, runtime?: number | null, voteAverage?: number | null, voteCount?: number | null, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string }, originalLanguage?: { __typename?: 'LanguageInfo', id: string, name: string } | null, attributes: Array<{ __typename?: 'ContentAttribute', source: string, key: string, value: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, collections: Array<{ __typename?: 'ContentCollection', type: string, source: string, id: string, name: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, externalLinks: Array<{ __typename?: 'ExternalLink', url: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }> } | null, languages?: Array<{ __typename?: 'LanguageInfo', id: string, name: string }> | null, episodes?: { __typename?: 'Episodes', label: string, seasons: Array<{ __typename?: 'Season', season: number, episodes?: Array | null }> } | null }>, aggregations: { __typename?: 'TorrentContentAggregations', contentType?: Array<{ __typename?: 'ContentTypeAgg', value?: ContentType | null, label: string, count: number, isEstimate: boolean }> | null, torrentSource?: Array<{ __typename?: 'TorrentSourceAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentTag?: Array<{ __typename?: 'TorrentTagAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentFileType?: Array<{ __typename?: 'TorrentFileTypeAgg', value: FileType, label: string, count: number, isEstimate: boolean }> | null, language?: Array<{ __typename?: 'LanguageAgg', value: Language, label: string, count: number, isEstimate: boolean }> | null, genre?: Array<{ __typename?: 'GenreAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, releaseYear?: Array<{ __typename?: 'ReleaseYearAgg', value?: number | null, label: string, count: number, isEstimate: boolean }> | null, videoResolution?: Array<{ __typename?: 'VideoResolutionAgg', value?: VideoResolution | null, label: string, count: number, isEstimate: boolean }> | null, videoSource?: Array<{ __typename?: 'VideoSourceAgg', value?: VideoSource | null, label: string, count: number, isEstimate: boolean }> | null } }; +export type TorrentContentSearchResultFragment = { __typename?: 'TorrentContentSearchResult', totalCount: number, totalCountIsEstimate: boolean, hasNextPage?: boolean | null, items: Array<{ __typename?: 'TorrentContent', id: string, infoHash: string, contentType?: ContentType | null, title: string, video3d?: Video3D | null, videoCodec?: VideoCodec | null, videoModifier?: VideoModifier | null, videoResolution?: VideoResolution | null, videoSource?: VideoSource | null, seeders?: number | null, leechers?: number | null, publishedAt: string, createdAt: string, updatedAt: string, torrent: { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }, content?: { __typename?: 'Content', type: ContentType, source: string, id: string, title: string, releaseDate?: string | null, releaseYear?: number | null, overview?: string | null, runtime?: number | null, voteAverage?: number | null, voteCount?: number | null, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string }, originalLanguage?: { __typename?: 'LanguageInfo', id: string, name: string } | null, attributes: Array<{ __typename?: 'ContentAttribute', source: string, key: string, value: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, collections: Array<{ __typename?: 'ContentCollection', type: string, source: string, id: string, name: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, externalLinks: Array<{ __typename?: 'ExternalLink', url: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }> } | null, languages?: Array<{ __typename?: 'LanguageInfo', id: string, name: string }> | null, episodes?: { __typename?: 'Episodes', label: string, seasons: Array<{ __typename?: 'Season', season: number, episodes?: Array | null }> } | null }>, aggregations: { __typename?: 'TorrentContentAggregations', contentType?: Array<{ __typename?: 'ContentTypeAgg', value?: ContentType | null, label: string, count: number, isEstimate: boolean }> | null, torrentSource?: Array<{ __typename?: 'TorrentSourceAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentTag?: Array<{ __typename?: 'TorrentTagAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentFileType?: Array<{ __typename?: 'TorrentFileTypeAgg', value: FileType, label: string, count: number, isEstimate: boolean }> | null, language?: Array<{ __typename?: 'LanguageAgg', value: Language, label: string, count: number, isEstimate: boolean }> | null, genre?: Array<{ __typename?: 'GenreAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, releaseYear?: Array<{ __typename?: 'ReleaseYearAgg', value?: number | null, label: string, count: number, isEstimate: boolean }> | null, videoResolution?: Array<{ __typename?: 'VideoResolutionAgg', value?: VideoResolution | null, label: string, count: number, isEstimate: boolean }> | null, videoSource?: Array<{ __typename?: 'VideoSourceAgg', value?: VideoSource | null, label: string, count: number, isEstimate: boolean }> | null } }; export type TorrentFileFragment = { __typename?: 'TorrentFile', infoHash: string, index: number, path: string, size: number, fileType?: FileType | null, createdAt: string, updatedAt: string }; @@ -932,7 +932,7 @@ export type TorrentContentSearchQueryVariables = Exact<{ }>; -export type TorrentContentSearchQuery = { __typename?: 'Query', torrentContent: { __typename?: 'TorrentContentQuery', search: { __typename?: 'TorrentContentSearchResult', totalCount: number, totalCountIsEstimate: boolean, hasNextPage?: boolean | null, items: Array<{ __typename?: 'TorrentContent', id: string, infoHash: string, contentType?: ContentType | null, title: string, video3d?: Video3d | null, videoCodec?: VideoCodec | null, videoModifier?: VideoModifier | null, videoResolution?: VideoResolution | null, videoSource?: VideoSource | null, seeders?: number | null, leechers?: number | null, publishedAt: string, createdAt: string, updatedAt: string, torrent: { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }, content?: { __typename?: 'Content', type: ContentType, source: string, id: string, title: string, releaseDate?: string | null, releaseYear?: number | null, overview?: string | null, runtime?: number | null, voteAverage?: number | null, voteCount?: number | null, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string }, originalLanguage?: { __typename?: 'LanguageInfo', id: string, name: string } | null, attributes: Array<{ __typename?: 'ContentAttribute', source: string, key: string, value: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, collections: Array<{ __typename?: 'ContentCollection', type: string, source: string, id: string, name: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, externalLinks: Array<{ __typename?: 'ExternalLink', url: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }> } | null, languages?: Array<{ __typename?: 'LanguageInfo', id: string, name: string }> | null, episodes?: { __typename?: 'Episodes', label: string, seasons: Array<{ __typename?: 'Season', season: number, episodes?: Array | null }> } | null }>, aggregations: { __typename?: 'TorrentContentAggregations', contentType?: Array<{ __typename?: 'ContentTypeAgg', value?: ContentType | null, label: string, count: number, isEstimate: boolean }> | null, torrentSource?: Array<{ __typename?: 'TorrentSourceAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentTag?: Array<{ __typename?: 'TorrentTagAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentFileType?: Array<{ __typename?: 'TorrentFileTypeAgg', value: FileType, label: string, count: number, isEstimate: boolean }> | null, language?: Array<{ __typename?: 'LanguageAgg', value: Language, label: string, count: number, isEstimate: boolean }> | null, genre?: Array<{ __typename?: 'GenreAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, releaseYear?: Array<{ __typename?: 'ReleaseYearAgg', value?: number | null, label: string, count: number, isEstimate: boolean }> | null, videoResolution?: Array<{ __typename?: 'VideoResolutionAgg', value?: VideoResolution | null, label: string, count: number, isEstimate: boolean }> | null, videoSource?: Array<{ __typename?: 'VideoSourceAgg', value?: VideoSource | null, label: string, count: number, isEstimate: boolean }> | null } } } }; +export type TorrentContentSearchQuery = { __typename?: 'Query', torrentContent: { __typename?: 'TorrentContentQuery', search: { __typename?: 'TorrentContentSearchResult', totalCount: number, totalCountIsEstimate: boolean, hasNextPage?: boolean | null, items: Array<{ __typename?: 'TorrentContent', id: string, infoHash: string, contentType?: ContentType | null, title: string, video3d?: Video3D | null, videoCodec?: VideoCodec | null, videoModifier?: VideoModifier | null, videoResolution?: VideoResolution | null, videoSource?: VideoSource | null, seeders?: number | null, leechers?: number | null, publishedAt: string, createdAt: string, updatedAt: string, torrent: { __typename?: 'Torrent', infoHash: string, name: string, size: number, filesStatus: FilesStatus, filesCount?: number | null, hasFilesInfo: boolean, singleFile?: boolean | null, fileType?: FileType | null, seeders?: number | null, leechers?: number | null, tagNames: Array, magnetUri: string, createdAt: string, updatedAt: string, sources: Array<{ __typename?: 'TorrentSourceInfo', key: string, name: string }> }, content?: { __typename?: 'Content', type: ContentType, source: string, id: string, title: string, releaseDate?: string | null, releaseYear?: number | null, overview?: string | null, runtime?: number | null, voteAverage?: number | null, voteCount?: number | null, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string }, originalLanguage?: { __typename?: 'LanguageInfo', id: string, name: string } | null, attributes: Array<{ __typename?: 'ContentAttribute', source: string, key: string, value: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, collections: Array<{ __typename?: 'ContentCollection', type: string, source: string, id: string, name: string, createdAt: string, updatedAt: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }>, externalLinks: Array<{ __typename?: 'ExternalLink', url: string, metadataSource: { __typename?: 'MetadataSource', key: string, name: string } }> } | null, languages?: Array<{ __typename?: 'LanguageInfo', id: string, name: string }> | null, episodes?: { __typename?: 'Episodes', label: string, seasons: Array<{ __typename?: 'Season', season: number, episodes?: Array | null }> } | null }>, aggregations: { __typename?: 'TorrentContentAggregations', contentType?: Array<{ __typename?: 'ContentTypeAgg', value?: ContentType | null, label: string, count: number, isEstimate: boolean }> | null, torrentSource?: Array<{ __typename?: 'TorrentSourceAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentTag?: Array<{ __typename?: 'TorrentTagAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, torrentFileType?: Array<{ __typename?: 'TorrentFileTypeAgg', value: FileType, label: string, count: number, isEstimate: boolean }> | null, language?: Array<{ __typename?: 'LanguageAgg', value: Language, label: string, count: number, isEstimate: boolean }> | null, genre?: Array<{ __typename?: 'GenreAgg', value: string, label: string, count: number, isEstimate: boolean }> | null, releaseYear?: Array<{ __typename?: 'ReleaseYearAgg', value?: number | null, label: string, count: number, isEstimate: boolean }> | null, videoResolution?: Array<{ __typename?: 'VideoResolutionAgg', value?: VideoResolution | null, label: string, count: number, isEstimate: boolean }> | null, videoSource?: Array<{ __typename?: 'VideoSourceAgg', value?: VideoSource | null, label: string, count: number, isEstimate: boolean }> | null } } } }; export type TorrentFilesQueryVariables = Exact<{ input: TorrentFilesQueryInput;