mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Movie group renames (#5039)
* Rename Movie and MoviePartial to Group/GroupPartial * Rename Movie interfaces * Update movie url builders to use group * Rename movieRoutes to groupRoutes * Update dataloader * Update names in sqlite package * Rename in resolvers * Add GroupByURL to scraper config * Scraper backward compatibility hacks
This commit is contained in:
@@ -57,7 +57,7 @@ func (db *Anonymiser) Anonymise(ctx context.Context) error {
|
||||
func() error { return db.anonymisePerformers(ctx) },
|
||||
func() error { return db.anonymiseStudios(ctx) },
|
||||
func() error { return db.anonymiseTags(ctx) },
|
||||
func() error { return db.anonymiseMovies(ctx) },
|
||||
func() error { return db.anonymiseGroups(ctx) },
|
||||
func() error { return db.Optimise(ctx) },
|
||||
})
|
||||
}(); err != nil {
|
||||
@@ -825,9 +825,9 @@ func (db *Anonymiser) anonymiseTags(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (db *Anonymiser) anonymiseMovies(ctx context.Context) error {
|
||||
logger.Infof("Anonymising movies")
|
||||
table := movieTableMgr.table
|
||||
func (db *Anonymiser) anonymiseGroups(ctx context.Context) error {
|
||||
logger.Infof("Anonymising groups")
|
||||
table := groupTableMgr.table
|
||||
lastID := 0
|
||||
total := 0
|
||||
const logEvery = 10000
|
||||
@@ -883,7 +883,7 @@ func (db *Anonymiser) anonymiseMovies(ctx context.Context) error {
|
||||
total++
|
||||
|
||||
if total%logEvery == 0 {
|
||||
logger.Infof("Anonymised %d movies", total)
|
||||
logger.Infof("Anonymised %d groups", total)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -893,7 +893,7 @@ func (db *Anonymiser) anonymiseMovies(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := db.anonymiseURLs(ctx, goqu.T(movieURLsTable), "movie_id"); err != nil {
|
||||
if err := db.anonymiseURLs(ctx, goqu.T(groupURLsTable), "movie_id"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user