Automatically sync TRaSH guides to your Sonarr and Radarr instances
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Robert Dailey 4059bd71cd
Ability to add tags to release profiles
3 years ago
sonarr_api_examples Renormalize line endings for all files 3 years ago
wiki@57c81ced7b Add wiki as submodule 3 years ago
.gitattributes Initial Commit 3 years ago
.gitignore Initial Commit 3 years ago
.gitmodules Add wiki as submodule 3 years ago
.markdownlint.json New markdown lint JSON file 3 years ago
README.md Ability to add tags to release profiles 3 years ago
trash.py Ability to add tags to release profiles 3 years ago

README.md

TRaSH Guide Updater Script

Automatically mirror TRaSH guides to your *darr instance.

NOTICE: This is a work-in-progress Python script

Features

Features list will continue to grow. See the limitations & roadmap section for more details!

  • Preferred, Must Not Contain, and Must Contain lists from guides are reflected completely in corresponding fields in release profiles in Sonarr.
  • "Include Preferred when Renaming" is properly checked/unchecked depending on explicit mention of this in the guides.
  • Profiles get created if they do not exist, or updated if they already exist. Profiles get a unique name based on the guide and this name is used to find them in subsequent runs.
  • Tags can be added to any updated or created profiles.

Requirements

  • Python 3
  • The following packages installed with pip:
    • requests
    • packaging
  • For Sonarr updates, you must be running version 3.0.4.1098 or greater.

Getting Started

I plan to add more tutorials/details/instructions later, but for now just run trash.py --help:

usage: trash.py [-h] [--preview] [--debug] base_uri api_key

Automatically mirror TRaSH guides to your *darr instance.

positional arguments:
  base_uri    The base URL for your Sonarr instance, for example `http://localhost:8989`.
  api_key     Your API key.

optional arguments:
  -h, --help  show this help message and exit
  --preview   Only display the processed markdown results and nothing else.
  --debug     Display additional logs useful for development/debug purposes

Important Notices

Please be aware that this script relies on a deterministic and consistent structure of the TRaSH Guide markdown files. I'm in the process of creating a set of rules/guidelines to reduce the risk of the guide breaking this script, but in the meantime the script may stop working at any time due to guide updates. I will do my best to fix them in a timely manner. Reporting such issues would be appreciated and will help identify issues more quickly.

Limitations

This script is a work in progress. At the moment, it only supports the following features and/or has the following limitations:

  • Only Sonarr is supported (Radarr will come in the future)
  • Only the Sonarr Anime Guide is supported (more guides to come)
  • Multiple scores on the same line are not supported. Only the first is used.

Roadmap

In addition to the above limitations, the following items are planned for the future.

  • Better and more polished error handling (it's pretty minimal right now)
  • Add a way to convert preferred with negative scores to "Must not contain" terms.
  • Implement some sort of guide versioning (e.g. to avoid updating a release profile if the guide did not change).
  • Unit Testing