mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Rename movie group backend (#5044)
* Rename movie go files * Rename movie package to group
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 405 B |
@@ -1,4 +1,4 @@
|
||||
package movie
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package movie
|
||||
package group
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -1,4 +1,4 @@
|
||||
package movie
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package movie
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package movie
|
||||
package group
|
||||
|
||||
import (
|
||||
"context"
|
||||
Reference in New Issue
Block a user