https://github.com/toddrob99/searcharr
This bot allows users to add movies to Radarr and series to Sonarr via Telegram messaging app.
Rename settings-sample.py
to settings.py
, and edit the settings within the file as necessary.
You are required to update the following settings, at minimum:
- Searcharr Bot > Password
- Telegram Bot > Token (see Telegram Bot Setup Instructions)
- Sonarr > URL, API Key, Quality Profile ID
- Radarr > URL, API Key, Quality Profile ID
Docker is the suggested method to run Searcharr. Be sure to map the following in your Docker container:
- Settings file to /app/settings.py
- Database folder to /app/data
- Log folder to /app/logs
A docker-compose.yml file is provided for your convenience. Update the volume mappings listed above, and then run docker-compose up -d
to start Searcharr.
If running from source, use Python 3.8.3+, install requirements using python -m pip install -r requirements.txt
, and then run searcharr.py
.
Send a private message to your bot saying /start <password>
where <password>
is the value of searcharr_password
in settings.py
. For admin access, instead say /start <admin_password>
where <admin_password>
is the value of searcharr_admin_password
in settings.py
. An authenticated user can add admin access by re-authenticating using the admin password. Re-authenticating with the non-admin password will not remove a user's admin access. Admin access must be removed by an admin using the /users
command, or manually in the database.
Caution: Authentication via /start
command will work in a group chat, but then everyone else in the group will see the password. If not all group members should be allowed to use the bot, then be sure to authenticate in a private message.
Double Caution: Do not authenticate as an admin in a group chat. Always use a private message with your bot.
Send the bot a (private or group) message saying /series <title>
or /movie <title>
. The bot will reply with information about the first result, along with buttons to move forward and back within the search results, pop out to tvdb, TMDB, or IMDb, add the current series/movie to Sonarr/Radarr, or cancel the search. When you click the button to add the series/movie to Sonarr/Radarr, the bot will ask what root folder to put the series/movie in--unless you only have one root folder configured in Sonarr/Radarr, in which case it will add it straight away.
If you are authenticated as an admin, you can use the /users
command to retrieve a list of users with buttons to remove all access and add/remove admin access (as applicable).
Authenticate by saying /start <password>
(or /start@bot_username <password>
in a group with multiple bots)
Search for movie using /movie <title>
or series using /series <title>
(behavior is the same). Buttons will appear to open the series/movie info in tvdb, IMDb, or TVDB when those ids are available.
If series/movie already exists in Sonarr/Radarr, the Add button will instead say "Already Added!":
If Sonarr/Radarr has multiple root folders configured, you will be prompted to select a root folder after clicking the Add button:
When the series/movie has been added, or you click Cancel, the search results will be removed: