Skip to content

Organizr Plugin Equivilent of TehMuffinMoo/Throttling-Webhooks

Notifications You must be signed in to change notification settings

causefx/SonarrThrottling

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonarr Throttling Organizr Plugin

This plugin allows you to specify a threshold for TV Show sizes and throttles downloads accordingly. It works by configuring a webhook in Overseerr and Tautulli to manage TV Show episode downloading based on if episodes are being watched. Shows with seasons/episodes over a configured threshold will be marked as throttled and only the first X number of episodes will be downloaded. Further episodes will only be downloaded when an event is logged in Tautulli. Using this method prevents large TV Shows from being downloaded for nobody to watch them.

This prevents large TV Shows from being downloaded whilst never getting watched. By using this method, there should always be at least X (Default 10) number of available epsiodes ahead of the last watched episode.

  • When a TV Show is requested in Overseerr, it's added to Sonarr unmonitored and webhook is triggered. (You need to make sure Overseerr is set to not monitor after adding)

    • If they exceed a configurable threshold (by default this is, 5 seasons or 25 epsisodes) then it will add a tag "throttled" (configurable) to the show in Sonarr and trigger the download of only the first 10 (also configurable) episodes.
    • If they are below threshold, the show is set to a normal monitored state and a full episode scan is started.
  • A second Webhook is then configured within Tautulli to trigger when content is watched.

    • Webbook checks if it is a TV Show and if it has the throttled tag in Sonarr
    • If throttled tag exists, identify the next unavailable episode and trigger search request
    • If all episodes have downloaded, mark TV show as monitored and remove throttled tag

The default Overseerr Webhook template works fine, this can be modified but you must ensure {{media}}->{{tvdbId}} and {{media}}->{{media_type}} remain populated.

❗ Important
The "Authorization" header must be populated with your Sonarr Throttling Plugin API Token.

Overseerr Webhook Example

Webhook URL: https://OrganizrURL/api/v2/plugins/sonarrthrottling/webhooks/overseerr

{
    "notification_type": "{{notification_type}}",
    "subject": "{{subject}}",
    "message": "{{message}}",
    "image": "{{image}}",
    "email": "{{notifyuser_email}}",
    "username": "{{notifyuser_username}}",
    "avatar": "{{notifyuser_avatar}}",
    "{{media}}": {
        "media_type": "{{media_type}}",
        "tmdbId": "{{media_tmdbid}}",
        "imdbId": "{{media_imdbid}}",
        "tvdbId": "{{media_tvdbid}}",
        "status": "{{media_status}}",
        "status4k": "{{media_status4k}}"
    },
    "{{extra}}": []
}

Tautulli Webhook Example

📝 For Tautulli I would suggest using either the Playback Start or Watched triggers for the best experience.

Webhook URL: https://OrganizrURL/api/v2/plugins/sonarrthrottling/webhooks/tautulli

JSON Headers

{
	"authorization": "SonarrThrottlingPlugin"
}

JSON Data

This can follow whatever format you like, but you must ensure {tvdbId} and {media_type} remain populated.

{
    "action": "{action}",
    "title": "{title}",
    "username": "{username}",
    "mediaType": "{media_type}",
    "tvdbId": "{thetvdb_id}"
}

Screenshots

plugin-settings-about plugin-settings plugin-settings-sonarr plugin-modal-dropdown plugin-modal-details

About

Organizr Plugin Equivilent of TehMuffinMoo/Throttling-Webhooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 86.5%
  • JavaScript 12.3%
  • CSS 1.2%