mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +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:
@@ -153,40 +153,6 @@ func (t changesetTranslator) intPtrFromString(value *string) (*int, error) {
|
||||
return &vv, nil
|
||||
}
|
||||
|
||||
func (t changesetTranslator) ratingConversion(legacyValue *int, rating100Value *int) *int {
|
||||
const (
|
||||
legacyField = "rating"
|
||||
rating100Field = "rating100"
|
||||
)
|
||||
|
||||
legacyRating := t.optionalInt(legacyValue, legacyField)
|
||||
if legacyRating.Set && !legacyRating.Null {
|
||||
ret := models.Rating5To100(legacyRating.Value)
|
||||
return &ret
|
||||
}
|
||||
|
||||
o := t.optionalInt(rating100Value, rating100Field)
|
||||
if o.Set && !o.Null {
|
||||
return &o.Value
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t changesetTranslator) optionalRatingConversion(legacyValue *int, rating100Value *int) models.OptionalInt {
|
||||
const (
|
||||
legacyField = "rating"
|
||||
rating100Field = "rating100"
|
||||
)
|
||||
|
||||
legacyRating := t.optionalInt(legacyValue, legacyField)
|
||||
if legacyRating.Set && !legacyRating.Null {
|
||||
legacyRating.Value = models.Rating5To100(legacyRating.Value)
|
||||
return legacyRating
|
||||
}
|
||||
return t.optionalInt(rating100Value, rating100Field)
|
||||
}
|
||||
|
||||
func (t changesetTranslator) optionalInt(value *int, field string) models.OptionalInt {
|
||||
if !t.hasField(field) {
|
||||
return models.OptionalInt{}
|
||||
|
||||
Reference in New Issue
Block a user