Script to Auto-Update Plex Library/Libraries When Sonarr Adds New Episode


#1

Hey Guys -

In the past, I posted here before asking for a script which would have Sonarr trigger a Plex library update for newly added episodes but to only have the series scanned - not the entire library as I have tons of media. Unfortunately, none of the solutions worked. After some troubleshooting, I have created one and thought I’d share hoping others may benefit. Below are a few details & notes about the script followed by a link to download the .ps1.

Sonarr -> Plex TV Series Update Script

  • Updates Plex immediately after episode is added
  • Supports just one or multiple Plex TV libraries
  • Scans only series for newly added episode - not the entire library
  • Written for Windows installation of Plex Media Server
  • Script comments include configuration steps

Script
You may download the script here. It’s only a .ps1 so no risk of virus / malware. I considered posting the code here, but formatting seemed off so decided not to.

Hope someone finds it useful. If you have any questions, please let me know. Thanks!


#2

Why wouldn’t you just go into the plex settings and check “Run a partial scan when changes are detected”?

Does that setting not work if Sonarr pushed the info to Plex?

(I don’t have Sonarr set up to notify Plex; Plex is set up to watch for changes and then scan the affected folder. That may not be your cup of tea though).


closed #3

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.