Release Memby 0.2.64
This commit is contained in:
@@ -134,6 +134,18 @@ type Episode struct {
|
||||
EpisodeFile *EpisodeFile `json:"episodeFile"`
|
||||
}
|
||||
|
||||
// SearchEpisode asks Sonarr to search exactly one episode. It deliberately uses the
|
||||
// episode ids command rather than a series command, so a replacement cannot search a
|
||||
// season or the show's backlog.
|
||||
func (c *Client) SearchEpisode(ctx context.Context, episodeID int) error {
|
||||
if episodeID <= 0 {
|
||||
return fmt.Errorf("sonarr: invalid episode id")
|
||||
}
|
||||
return c.post(ctx, "/api/v3/command", map[string]any{
|
||||
"name": "EpisodeSearch", "episodeIds": []int{episodeID},
|
||||
}, &struct{}{})
|
||||
}
|
||||
|
||||
type APIError struct {
|
||||
StatusCode int
|
||||
Body string
|
||||
|
||||
Reference in New Issue
Block a user