Performer disambiguation and aliases (#3113)

* Refactor performer relationships
* Remove checksum from performer
* Add disambiguation, overhaul aliases
* Add disambiguation filter criterion
* Improve name matching during import
* Add disambiguation filtering in UI
* Include aliases in performer select
This commit is contained in:
WithoutPants
2022-12-01 13:54:08 +11:00
committed by GitHub
parent d2395e579c
commit 4daf0a14a2
72 changed files with 2283 additions and 993 deletions

View File

@@ -62,11 +62,12 @@ type GenderCriterionInput struct {
}
type PerformerFilterType struct {
And *PerformerFilterType `json:"AND"`
Or *PerformerFilterType `json:"OR"`
Not *PerformerFilterType `json:"NOT"`
Name *StringCriterionInput `json:"name"`
Details *StringCriterionInput `json:"details"`
And *PerformerFilterType `json:"AND"`
Or *PerformerFilterType `json:"OR"`
Not *PerformerFilterType `json:"NOT"`
Name *StringCriterionInput `json:"name"`
Disambiguation *StringCriterionInput `json:"disambiguation"`
Details *StringCriterionInput `json:"details"`
// Filter by favorite
FilterFavorites *bool `json:"filter_favorites"`
// Filter by birth year
@@ -159,9 +160,10 @@ type PerformerReader interface {
// support the query needed
QueryForAutoTag(ctx context.Context, words []string) ([]*Performer, error)
Query(ctx context.Context, performerFilter *PerformerFilterType, findFilter *FindFilterType) ([]*Performer, int, error)
AliasLoader
GetImage(ctx context.Context, performerID int) ([]byte, error)
StashIDLoader
GetTagIDs(ctx context.Context, performerID int) ([]int, error)
TagIDLoader
}
type PerformerWriter interface {
@@ -171,8 +173,6 @@ type PerformerWriter interface {
Destroy(ctx context.Context, id int) error
UpdateImage(ctx context.Context, performerID int, image []byte) error
DestroyImage(ctx context.Context, performerID int) error
UpdateStashIDs(ctx context.Context, performerID int, stashIDs []StashID) error
UpdateTags(ctx context.Context, performerID int, tagIDs []int) error
}
type PerformerReaderWriter interface {