mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Feature: Support Multiple URLs in Studios (#6223)
* Backend support for studio URLs * FrontEnd addition * Support URLs in BulkStudioUpdate * Update tagger modal for URLs --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -619,7 +619,6 @@ func (db *Anonymiser) anonymiseStudios(ctx context.Context) error {
|
||||
query := dialect.From(table).Select(
|
||||
table.Col(idColumn),
|
||||
table.Col("name"),
|
||||
table.Col("url"),
|
||||
table.Col("details"),
|
||||
).Where(table.Col(idColumn).Gt(lastID)).Limit(1000)
|
||||
|
||||
@@ -630,14 +629,12 @@ func (db *Anonymiser) anonymiseStudios(ctx context.Context) error {
|
||||
var (
|
||||
id int
|
||||
name sql.NullString
|
||||
url sql.NullString
|
||||
details sql.NullString
|
||||
)
|
||||
|
||||
if err := rows.Scan(
|
||||
&id,
|
||||
&name,
|
||||
&url,
|
||||
&details,
|
||||
); err != nil {
|
||||
return err
|
||||
@@ -645,7 +642,6 @@ func (db *Anonymiser) anonymiseStudios(ctx context.Context) error {
|
||||
|
||||
set := goqu.Record{}
|
||||
db.obfuscateNullString(set, "name", name)
|
||||
db.obfuscateNullString(set, "url", url)
|
||||
db.obfuscateNullString(set, "details", details)
|
||||
|
||||
if len(set) > 0 {
|
||||
@@ -677,6 +673,10 @@ func (db *Anonymiser) anonymiseStudios(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := db.anonymiseURLs(ctx, goqu.T(studioURLsTable), "studio_id"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user