This is a program that bridges the divide between Sonarr/Radarr/Whisparr and Tdarr. Typically Tdarr operates by filesystem events, as well as periodic disk scanning. This program takes information from Sonarr/Radarr/Whisparr and "Informs" Tdarr of new/changed/deleted files.
If you enjoy the code, consider buying me a Coke!
There are 4 ways to use this program.
- The original way uses the Custom Script functionality of Sonarr/Radarr/Whisparr.
- You can also run it via CLI, but this is mostly for testing, and I haven't documented this yet.
- The NEW MODE is to run it with the
--mode serverargument. - You can use this within Docker where it automatically runs in Server Mode.
Note
Sonarr/Radarr/Whisparr file paths must be accessible to Tdarr. This script does not currently "translate" paths. This may be added in the future.
- Download the script
- install python3 and python3-pip
- Install the Python requirements
pip3 install -r requirements.txt - Generate a config file using
python3 tdarr_inform.py --setup - Modify your
[tdarr]/addressinconfig.ini
For Standalone, you are done. For server mode
-
Go to Settings/Connect
-
Add
-
Webhook
-
Select Import,Upgrade,Rename,Delete(multiple versions of delete)
-
Set your ip-address/hostname, port 5004 with a path of /api/events
http://tdarr-inform.local:5004/api/eventshttp://127.0.0.1:5004/api/events -
Run the program
python3 /path/to/tdarr_inform.py --mode server6.5) You could run it with systemd as well. -
In a browser you can play with the web interface.
-
Go to Settings/Connect
-
Add
-
Custom Script
-
Select Import,Upgrade,Rename,Delete(multiple versions of delete)
-
Set the path to the script
-
You might see permissions issues for the script if your sonarr user doesnt have permission to run it.
chownit to your needs.
This can be used in Server Mode from within Docker where it will automatically create a /config/config.ini file if needed. It is important to mount the config folder elsewhere so your settings don't get lost if this is updated.
The examples listed below are very basic, and will run if tdarr is also running locally. In reality you should attach to the same network as tdarr (and update the settings to point at the correct hostname etc).
services:
tdarr_inform:
image: ghcr.io/deathbybandaid/tdarr_inform:latest
restart: unless-stopped
network_mode: host
user: "1000:1000" # This is the same as the default
ports:
- "5004:5004"
volumes:
- "/path/to/config:/config"docker run -d \
-p 5004:5004 \
-v /path/to/config:/config \
--restart unless-stopped \
--network=host \
ghcr.io/deathbybandaid/tdarr_inform:latestThis is a copy of the file created by the --config option:
Default config
[logging]
level = INFO
format = None
[database]
type = sqlite
driver = None
user = None
pass = None
host = None
port = None
name = None
[main]
cache_dir = None
[tdarr_inform]
address = 0.0.0.0
port = 5004
require_auth = None
friendlyname = tdarr_inform
versions_check_interval = 10800
humanized_time_granularity = second
[tdarr]
address = localhost
port = 8265
ssl = None
accept_root_drive_path = 1
[web_ui]
theme = None
access_level = None
auto_page_refresh = 5
pages_to_refresh = NoneTdarr is able to listen to filesystem events and/or scan the filesystem periodically.
When you store your files on a File Server or NAS, and use samba/CIFS, you lose out on filesystem events, requiring Tdarr to be dependent on frequent scans, which for large libraries can waste resources and consume a lot of time. If your applications are able to receive filesystem events, tdarr_inform may be of little help for your setup.
This tool is designed to let Sonarr/Radarr/Whisparr directly communicate with Tdarr, much like Cloudbox/autoscan is able to communicate between Sonarr/Radarr/Whisparr/Lidarr and Plex/Emby/Jellyfin.
Using tools like this allows you to reduce the file scans to 6hours/12hours/daily instead of very frequently.
Adding a direct communication between apps, allows for Tdarr to convert new media more quickly, and often prior to the media server detecting changed files. This can usually help with end-users streaming content from your media server before the content is handled by Tdarr.