Rename movie group backend (#5044)

* Rename movie go files
* Rename movie package to group
This commit is contained in:
WithoutPants 2024-07-04 11:36:05 +10:00 committed by GitHub
parent 3ddfafa831
commit 720b233be6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 16 additions and 16 deletions

View File

@ -6,9 +6,9 @@ import (
"github.com/stashapp/stash/internal/api/loaders"
"github.com/stashapp/stash/internal/api/urlbuilders"
"github.com/stashapp/stash/pkg/gallery"
"github.com/stashapp/stash/pkg/group"
"github.com/stashapp/stash/pkg/image"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/movie"
"github.com/stashapp/stash/pkg/performer"
"github.com/stashapp/stash/pkg/scene"
)
@ -100,7 +100,7 @@ func (r *studioResolver) PerformerCount(ctx context.Context, obj *models.Studio,
func (r *studioResolver) GroupCount(ctx context.Context, obj *models.Studio, depth *int) (ret int, err error) {
if err := r.withReadTxn(ctx, func(ctx context.Context) error {
ret, err = movie.CountByStudioID(ctx, r.repository.Group, obj.ID, depth)
ret, err = group.CountByStudioID(ctx, r.repository.Group, obj.ID, depth)
return err
}); err != nil {
return 0, err

View File

@ -6,9 +6,9 @@ import (
"github.com/stashapp/stash/internal/api/loaders"
"github.com/stashapp/stash/internal/api/urlbuilders"
"github.com/stashapp/stash/pkg/gallery"
"github.com/stashapp/stash/pkg/group"
"github.com/stashapp/stash/pkg/image"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/movie"
"github.com/stashapp/stash/pkg/performer"
"github.com/stashapp/stash/pkg/scene"
"github.com/stashapp/stash/pkg/studio"
@ -122,7 +122,7 @@ func (r *tagResolver) StudioCount(ctx context.Context, obj *models.Tag, depth *i
func (r *tagResolver) GroupCount(ctx context.Context, obj *models.Tag, depth *int) (ret int, err error) {
if err := r.withReadTxn(ctx, func(ctx context.Context) error {
ret, err = movie.CountByTagID(ctx, r.repository.Group, obj.ID, depth)
ret, err = group.CountByTagID(ctx, r.repository.Group, obj.ID, depth)
return err
}); err != nil {
return 0, err

View File

@ -15,13 +15,13 @@ import (
"github.com/stashapp/stash/internal/manager/config"
"github.com/stashapp/stash/pkg/fsutil"
"github.com/stashapp/stash/pkg/gallery"
"github.com/stashapp/stash/pkg/group"
"github.com/stashapp/stash/pkg/image"
"github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/models/json"
"github.com/stashapp/stash/pkg/models/jsonschema"
"github.com/stashapp/stash/pkg/models/paths"
"github.com/stashapp/stash/pkg/movie"
"github.com/stashapp/stash/pkg/performer"
"github.com/stashapp/stash/pkg/scene"
"github.com/stashapp/stash/pkg/sliceutil"
@ -1135,7 +1135,7 @@ func (t *ExportTask) exportGroup(ctx context.Context, wg *sync.WaitGroup, jobCha
continue
}
newGroupJSON, err := movie.ToJSON(ctx, groupReader, studioReader, m)
newGroupJSON, err := group.ToJSON(ctx, groupReader, studioReader, m)
if err != nil {
logger.Errorf("[groups] <%s> error getting tag JSON: %v", m.Name, err)

View File

@ -13,12 +13,12 @@ import (
"github.com/stashapp/stash/pkg/file"
"github.com/stashapp/stash/pkg/fsutil"
"github.com/stashapp/stash/pkg/gallery"
"github.com/stashapp/stash/pkg/group"
"github.com/stashapp/stash/pkg/image"
"github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/models/jsonschema"
"github.com/stashapp/stash/pkg/models/paths"
"github.com/stashapp/stash/pkg/movie"
"github.com/stashapp/stash/pkg/performer"
"github.com/stashapp/stash/pkg/scene"
"github.com/stashapp/stash/pkg/studio"
@ -351,7 +351,7 @@ func (t *ImportTask) ImportGroups(ctx context.Context) {
logger.Progressf("[groups] %d of %d", index, len(files))
if err := r.WithTxn(ctx, func(ctx context.Context) error {
groupImporter := &movie.Importer{
groupImporter := &group.Importer{
ReaderWriter: r.Group,
StudioWriter: r.Studio,
TagWriter: r.Tag,

View File

@ -7,7 +7,7 @@ import (
"io/fs"
)
//go:embed performer performer_male scene image tag studio movie
//go:embed performer performer_male scene image tag studio group
var data embed.FS
const (
@ -26,8 +26,8 @@ const (
Studio = "studio"
DefaultStudioImage = "studio/studio.svg"
Group = "movie"
DefaultGroupImage = "movie/movie.png"
Group = "group"
DefaultGroupImage = "group/group.png"
)
// Sub returns an FS rooted at path, using fs.Sub.

View File

Before

Width:  |  Height:  |  Size: 405 B

After

Width:  |  Height:  |  Size: 405 B

View File

@ -1,4 +1,4 @@
package movie
package group
import (
"context"

View File

@ -1,4 +1,4 @@
package movie
package group
import (
"errors"

View File

@ -1,4 +1,4 @@
package movie
package group
import (
"context"

View File

@ -1,4 +1,4 @@
package movie
package group
import (
"context"

View File

@ -1,4 +1,4 @@
package movie
package group
import (
"context"