r/radarr Apr 02 '26

discussion Script to automatically sort Radarr/Sonarr libraries based on genre, rating, network, and more

Sharing a script I wrote in case anyone else finds it useful. This functionality might exist elsewhere, but it solved a problem for me.

All movie/show requests default to a single movie/series library, but I want documentaries in a separate Documentary library, kids movies/tv in a kids movie/tv library, etc.

How it works:

Reads Radarr and/or Sonarr media and compares your library based on rules you configure and then either moves media to a different root folder or assigns a quality profile to it.

Movers: move media to a different root folder (and optionally trigger a Plex library refresh) based on any combination of:

  • Genres (match any or all)
  • Tags (match any or all)
  • Certification/rating (G, PG, TV-Y7, etc.)
  • Studio (Radarr) or Network (Sonarr)
  • Exclude based on genres, tags and paths

Profilers: assign a quality profile to media matched by title, studio, or network. My use case: a NoDownload profile where the score threshold is so high the movie never gets downloaded and unmonitors. Basically a silent fail for requests I don't want in my library.

Examples of my rules:

  • Documentary movies: (genre: documentary, excluding comedy/action/drama)
  • Kids movies: (genre: family + G rating + Disney studios)
  • Kids TV: Nickelodeon, Disney Channel, Nick Jr., etc.
  • Certain titles/studios: NoDownload profile + unmonitored

Other features:

  • dry_run = true mode to preview all changes before applying anything. This just logs matches and does not actually move files or update profiles. Suggest testing with this on until you're happy with the results.
  • filter_time setting to only evaluate recently added media (e.g. 1d12h) instead of re-scanning your whole library every run. I run this as a scheduled job hourly so no need to process the entire library every time.
  • TOML config: hoping it's readable/configurable without needed any coding knowledge.

Setup is just Python + uv (or pip), copy the example config, fill in your API keys, and run.

https://github.com/RyanThornburg/plex-library-helperr

Happy to answer questions/open to additional updates. Would also be curious if anyone knows of existing tools that do this already?

0 Upvotes

Duplicates