mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Remove deprecated graphql fields (#4064)
* Remove deprecated list*Scrapers queries * Remove other deprecated query resolvers * Remove deprecated config fields * Remove deprecated gallery fields * Remove deprecated image fields * Remove deprecated movie fields * Remove deprecated performer fields * Document scrape function issue * Remove deprecated studio fields * Remove deprecated scan input fields * Remove deprecated scene fields * Remove deprecated fields from filters * Remove scene.file_mod_time
This commit is contained in:
@@ -5,15 +5,9 @@ import (
|
||||
|
||||
"github.com/stashapp/stash/internal/api/loaders"
|
||||
"github.com/stashapp/stash/internal/api/urlbuilders"
|
||||
"github.com/stashapp/stash/pkg/hash/md5"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
)
|
||||
|
||||
func (r *movieResolver) Checksum(ctx context.Context, obj *models.Movie) (string, error) {
|
||||
// generate checksum from movie name
|
||||
return md5.FromString(obj.Name), nil
|
||||
}
|
||||
|
||||
func (r *movieResolver) Date(ctx context.Context, obj *models.Movie) (*string, error) {
|
||||
if obj.Date != nil {
|
||||
result := obj.Date.String()
|
||||
@@ -22,14 +16,6 @@ func (r *movieResolver) Date(ctx context.Context, obj *models.Movie) (*string, e
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (r *movieResolver) Rating(ctx context.Context, obj *models.Movie) (*int, error) {
|
||||
if obj.Rating != nil {
|
||||
rating := models.Rating100To5(*obj.Rating)
|
||||
return &rating, nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (r *movieResolver) Rating100(ctx context.Context, obj *models.Movie) (*int, error) {
|
||||
return obj.Rating, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user