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:
WithoutPants
2023-10-17 11:59:35 +11:00
committed by GitHub
parent a9ab1fcca7
commit b6714fafba
66 changed files with 101 additions and 1223 deletions

View File

@@ -17,8 +17,6 @@ type GalleryFilterType struct {
IsMissing *string `json:"is_missing"`
// Filter to include/exclude galleries that were created from zip
IsZip *bool `json:"is_zip"`
// Filter by rating expressed as 1-5
Rating *IntCriterionInput `json:"rating"`
// Filter by rating expressed as 1-100
Rating100 *IntCriterionInput `json:"rating100"`
// Filter by organized
@@ -62,7 +60,6 @@ type GalleryUpdateInput struct {
Urls []string `json:"urls"`
Date *string `json:"date"`
Details *string `json:"details"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
Organized *bool `json:"organized"`
SceneIds []string `json:"scene_ids"`

View File

@@ -14,8 +14,6 @@ type ImageFilterType struct {
Path *StringCriterionInput `json:"path"`
// Filter by file count
FileCount *IntCriterionInput `json:"file_count"`
// Filter by rating expressed as 1-5
Rating *IntCriterionInput `json:"rating"`
// Filter by rating expressed as 1-100
Rating100 *IntCriterionInput `json:"rating100"`
// Filter by date

View File

@@ -221,12 +221,6 @@ func (s ScenePartial) UpdateInput(id int) SceneUpdateInput {
StashIds: stashIDs,
}
if s.Rating.Set && !s.Rating.Null {
// convert to 1-100 scale
rating := Rating100To5(s.Rating.Value)
ret.Rating = &rating
}
return ret
}

View File

@@ -12,17 +12,16 @@ func TestScenePartial_UpdateInput(t *testing.T) {
)
var (
title = "title"
code = "1337"
details = "details"
director = "director"
url = "url"
date = "2001-02-03"
ratingLegacy = 4
rating100 = 80
organized = true
studioID = 2
studioIDStr = "2"
title = "title"
code = "1337"
details = "details"
director = "director"
url = "url"
date = "2001-02-03"
rating100 = 80
organized = true
studioID = 2
studioIDStr = "2"
)
dateObj, _ := ParseDate(date)
@@ -58,7 +57,6 @@ func TestScenePartial_UpdateInput(t *testing.T) {
Director: &director,
Urls: []string{url},
Date: &date,
Rating: &ratingLegacy,
Rating100: &rating100,
Organized: &organized,
StudioID: &studioIDStr,

View File

@@ -6,8 +6,6 @@ type MovieFilterType struct {
Synopsis *StringCriterionInput `json:"synopsis"`
// Filter by duration (in seconds)
Duration *IntCriterionInput `json:"duration"`
// Filter by rating expressed as 1-5
Rating *IntCriterionInput `json:"rating"`
// Filter by rating expressed as 1-100
Rating100 *IntCriterionInput `json:"rating100"`
// Filter to only include movies with this studio

View File

@@ -165,8 +165,6 @@ type PerformerFilterType struct {
StashID *StringCriterionInput `json:"stash_id"`
// Filter by StashID Endpoint
StashIDEndpoint *StashIDCriterionInput `json:"stash_id_endpoint"`
// Filter by rating expressed as 1-5
Rating *IntCriterionInput `json:"rating"`
// Filter by rating expressed as 1-100
Rating100 *IntCriterionInput `json:"rating100"`
// Filter by url
@@ -220,7 +218,6 @@ type PerformerCreateInput struct {
// This should be a URL or a base64 encoded data URL
Image *string `json:"image"`
StashIds []StashID `json:"stash_ids"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
Details *string `json:"details"`
DeathDate *string `json:"death_date"`
@@ -257,7 +254,6 @@ type PerformerUpdateInput struct {
// This should be a URL or a base64 encoded data URL
Image *string `json:"image"`
StashIds []StashID `json:"stash_ids"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
Details *string `json:"details"`
DeathDate *string `json:"death_date"`

View File

@@ -29,8 +29,6 @@ type SceneFilterType struct {
Path *StringCriterionInput `json:"path"`
// Filter by file count
FileCount *IntCriterionInput `json:"file_count"`
// Filter by rating expressed as 1-5
Rating *IntCriterionInput `json:"rating"`
// Filter by rating expressed as 1-100
Rating100 *IntCriterionInput `json:"rating100"`
// Filter by organized
@@ -128,7 +126,6 @@ type SceneCreateInput struct {
URL *string `json:"url"`
Urls []string `json:"urls"`
Date *string `json:"date"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
Organized *bool `json:"organized"`
StudioID *string `json:"studio_id"`
@@ -155,7 +152,6 @@ type SceneUpdateInput struct {
URL *string `json:"url"`
Urls []string `json:"urls"`
Date *string `json:"date"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
OCounter *int `json:"o_counter"`
Organized *bool `json:"organized"`

View File

@@ -14,8 +14,6 @@ type StudioFilterType struct {
StashIDEndpoint *StashIDCriterionInput `json:"stash_id_endpoint"`
// Filter to only include studios missing this property
IsMissing *string `json:"is_missing"`
// Filter by rating expressed as 1-5
Rating *IntCriterionInput `json:"rating"`
// Filter by rating expressed as 1-100
Rating100 *IntCriterionInput `json:"rating100"`
// Filter by scene count
@@ -43,7 +41,6 @@ type StudioCreateInput struct {
// This should be a URL or a base64 encoded data URL
Image *string `json:"image"`
StashIds []StashID `json:"stash_ids"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
Details *string `json:"details"`
Aliases []string `json:"aliases"`
@@ -58,7 +55,6 @@ type StudioUpdateInput struct {
// This should be a URL or a base64 encoded data URL
Image *string `json:"image"`
StashIds []StashID `json:"stash_ids"`
Rating *int `json:"rating"`
Rating100 *int `json:"rating100"`
Details *string `json:"details"`
Aliases []string `json:"aliases"`