-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API assistance #1383
Comments
You have to keep in mind that adding a new series doesn't immediately populate it's metadata. For that you'll have to check the /api/command endpoint (Under the hood Sonarr triggers an async RefreshSeries command). Or poll /api/series/{id}. A POST on /api/episode is the only way to monitor it, but keep in mind that the series & season need to be monitored as well. |
So for Sonarr to search for an episode, the Series and Episode need to be monitored? So we would also need to check the Series monitored status and set it to monitored... Which could potentially trigger multiple searches. If there are multiple episodes that have the monitored flag, and the series is unmonitored, if I switch the series to monitored, would Sonarr search for all of the monitored episodes (if no file exists on disk)? |
For Sonarr to automatically grab it from RSS it does, for a search of a single episode the monitored statuses of the series and episode are ignored (we assume you know what you're doing).
No, searches are entirely up to the user to trigger, though they would be susceptible to grabbing via RSS (The first two questions and answers in the FAQ explain in more detail how Sonarr finds things automatically). |
Thanks @markus101 That does clear things up. So please correct me if this flow is wrong (I want to make sure I am using Sonarr the correct way) So the above flow is for "requesting" a single episode, if the series doesn't exist then it will create it with an monitored status (Since we want a single episode). |
Between adding the series and monitoring the episode you'd need to wait for the episode metadata to download (which comes in via an SeriesRefresh), normally that data is fetched pretty quickly, the best way as @Taloth mentioned is to check the command endpoint to make sure that series isn't refreshing. I'm assuming the EpisodeExist check is to see if there is an episode file, whether there is a file or not will be known when the series refresh finishes. Besides the when to wait for metadata check that looks like it covers what you're looking to do. |
Thanks! |
Hello,
I've been developing PlexRequests.Net and the application integrates with Sonarr!
So I'm planning to develop a feature to be able to add specific episodes to Sonarr (We currently support specific series but there is a requirement to go to selecting individual episodes).
What in your opinion would be the best way to accomplish this with Sonarr.
My thought was to add the series into Sonarr as un-monitored and then POST the /episode endpoint and modify the monitored flag for each episode the user has selected.
Let me know your thoughts or if you think there is a better way to accomplish this.
(Referenced PR.Net issue: Ombi-app/Ombi#254)
The text was updated successfully, but these errors were encountered: