Studio Tagger (#3510)

* Studio image and parent studio support in scene tagger
* Refactor studio backend and add studio tagger
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
Flashy78
2023-07-30 16:50:24 -07:00
committed by GitHub
parent d48dbeb864
commit a665a56ef0
79 changed files with 5224 additions and 1039 deletions

View File

@@ -48,6 +48,7 @@ type StudioReader interface {
FindChildren(ctx context.Context, id int) ([]*Studio, error)
FindByName(ctx context.Context, name string, nocase bool) (*Studio, error)
FindByStashID(ctx context.Context, stashID StashID) ([]*Studio, error)
FindByStashIDStatus(ctx context.Context, hasStashID bool, stashboxEndpoint string) ([]*Studio, error)
Count(ctx context.Context) (int, error)
All(ctx context.Context) ([]*Studio, error)
// TODO - this interface is temporary until the filter schema can fully
@@ -56,18 +57,16 @@ type StudioReader interface {
Query(ctx context.Context, studioFilter *StudioFilterType, findFilter *FindFilterType) ([]*Studio, int, error)
GetImage(ctx context.Context, studioID int) ([]byte, error)
HasImage(ctx context.Context, studioID int) (bool, error)
AliasLoader
StashIDLoader
GetAliases(ctx context.Context, studioID int) ([]string, error)
}
type StudioWriter interface {
Create(ctx context.Context, newStudio *Studio) error
UpdatePartial(ctx context.Context, id int, updatedStudio StudioPartial) (*Studio, error)
UpdatePartial(ctx context.Context, input StudioPartial) (*Studio, error)
Update(ctx context.Context, updatedStudio *Studio) error
Destroy(ctx context.Context, id int) error
UpdateImage(ctx context.Context, studioID int, image []byte) error
UpdateStashIDs(ctx context.Context, studioID int, stashIDs []StashID) error
UpdateAliases(ctx context.Context, studioID int, aliases []string) error
}
type StudioReaderWriter interface {