Skip to content

Commit

Permalink
fix params for sonarr get episodes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Jun 25, 2021
1 parent f72c694 commit 9e86a2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sonarr/sonarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ func (s *Sonarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error) {
func (s *Sonarr) GetSeriesEpisodes(seriesID int64) ([]*Episode, error) {
var output []*Episode

err := s.GetInto("v3/episode?seriesId="+strconv.FormatInt(seriesID, 10), nil, &output)
params := make(url.Values)
params.Add("seriesId", strconv.FormatInt(seriesID, 10))

err := s.GetInto("v3/episode?seriesId", params, &output)
if err != nil {
return nil, fmt.Errorf("api.Get(episode): %w", err)
}
Expand Down

0 comments on commit 9e86a2c

Please sign in to comment.