diff --git a/radarr/movieeditor.go b/radarr/movieeditor.go index f3a3d44..daf738c 100644 --- a/radarr/movieeditor.go +++ b/radarr/movieeditor.go @@ -15,16 +15,16 @@ const bpMovieEditor = bpMovie + "/editor" // You may use starr.True(), starr.False(), starr.Int64(), and starr.String() to add data to the struct members. // Use Availability.Ptr() to add a value to minimum availability, and starr.ApplyTags.Ptr() for apply tags. type BulkEdit struct { - MovieIDs []int64 `json:"movieIds"` - Monitored *bool `json:"monitored,omitempty"` - QualityProfileID *int64 `json:"qualityProfileId,omitempty"` - MinimumAvailability *Availability `json:"minimumAvailability,omitempty"` // tba - RootFolderPath *string `json:"rootFolderPath,omitempty"` // path - Tags []int `json:"tags,omitempty"` // [0] - ApplyTags *starr.ApplyTags `json:"applyTags,omitempty"` // add - MoveFiles *bool `json:"moveFiles,omitempty"` - DeleteFiles *bool `json:"deleteFiles,omitempty"` // delete only - AddImportExclusion *bool `json:"addImportExclusion,omitempty"` // delete only + MovieIDs []int64 `json:"movieIds"` + Monitored *bool `json:"monitored,omitempty"` + QualityProfileID *int64 `json:"qualityProfileId,omitempty"` + MinimumAvailability Availability `json:"minimumAvailability,omitempty"` // tba + RootFolderPath *string `json:"rootFolderPath,omitempty"` // path + Tags []int `json:"tags,omitempty"` // [0] + ApplyTags starr.ApplyTags `json:"applyTags,omitempty"` // add + MoveFiles *bool `json:"moveFiles,omitempty"` + DeleteFiles *bool `json:"deleteFiles,omitempty"` // delete only + AddImportExclusion *bool `json:"addImportExclusion,omitempty"` // delete only } // Availability is an enum used as MinimumAvailability in a few places throughout Radarr. diff --git a/radarr/movieeditor_test.go b/radarr/movieeditor_test.go index 4424c61..8aed5e0 100644 --- a/radarr/movieeditor_test.go +++ b/radarr/movieeditor_test.go @@ -41,8 +41,8 @@ func TestEditMovies(t *testing.T) { WithRequest: &radarr.BulkEdit{ MovieIDs: []int64{17, 13}, Tags: []int{44, 55, 66}, - ApplyTags: starr.TagsAdd.Ptr(), - MinimumAvailability: radarr.AvailabilityToBeAnnounced.Ptr(), + ApplyTags: starr.TagsAdd, + MinimumAvailability: radarr.AvailabilityToBeAnnounced, }, ExpectedRequest: `{"movieIds":[17,13],"minimumAvailability":"tba","tags":[44,55,66],"applyTags":"add"}` + "\n", ExpectedMethod: http.MethodPut, diff --git a/shared.go b/shared.go index c8b61e7..159d0b6 100644 --- a/shared.go +++ b/shared.go @@ -288,11 +288,6 @@ const ( TagsReplace ApplyTags = "replace" ) -// Ptr returns a pointer to an apply tags value. Useful for a BulkEdit struct. -func (a ApplyTags) Ptr() *ApplyTags { - return &a -} - // TimeSpan is part of AudioTags and possibly used other places. type TimeSpan struct { Ticks int64 `json:"ticks"`