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:
WithoutPants
2024-07-04 09:10:26 +10:00
committed by GitHub
parent b69d9cc840
commit 15a7b8a859
83 changed files with 1765 additions and 1646 deletions

View File

@@ -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
}