Compatible with Radarr & Sonarr. Includes a REST API.
Running the discord bot requires a discord developer account, and a bot created/invited (via your developer account) to your chosen discord server.
As this application is intended to interface with Sonarr and Radarr, you will need one or both installed. If you are installing to a machine that is not also hosting your Radarr/Sonarr, you must be able to access Radarr/Sonarr from the host (locally or remotely).
wget https://raw.githubusercontent.com/nickheyer/DiscoFlix/main/auto_install_update.sh
sudo ./auto_install_update.sh
To get the latest version of Discoflix, run:
docker image pull nickheyer/discoflix:latest
To run Discoflix in a container, use the following command. Make sure to mount a volume to /app/data
in the container so that your data persists across container restarts. Here's how to do it:
Example:
docker run -d -p 5454:5454 --name discoflix -v /opt/discoflix/data:/app/data nickheyer/discoflix
On Other Platforms:
You can replace /opt/discoflix/data
with an appropriate path on your local system. For Windows and macOS, specify the full path you want to use for data storage.
This allows DiscoFlix's database to remain on your pc even if you delete or update your container!
The server within the docker container can be accessed locally at http://127.0.0.1:5454
First, get the compose file:
mkdir -p /opt/discoflix/data && cd /opt/discoflix
wget https://raw.githubusercontent.com/nickheyer/DiscoFlix/main/docker-compose.yml
With Docker Compose installed on your system, you can start Discoflix by running:
docker-compose -f /opt/discoflix/docker-compose.yml up -d
This will pull the latest Discoflix image and run it, mounting the volume specified in the docker-compose.yml
file. This will use the default /opt/discoflix/data, so modify this path if needed.
The server within the docker container can be accessed locally at http://127.0.0.1:5454
To stop the service, use:
docker-compose -f /opt/discoflix/docker-compose.yml down
NOTE: Installation from source using Windows has been deprecated with the introduction of web-socket functionality, gevent, and other integral parts of this application that are not currently supported by Microsoft.
- Python - Download and install Python here. Make sure that you choose "Add Python to environmental variables" during installation.
- Git - Download and install Git here
- Change directory to preferred install location
cd /where/you/want/this/installed
- Clone DiscoFlix
git clone https://github.com/nickheyer/DiscoFlix
- Change directory to DiscoFlix
cd ./DiscoFlix
- Install Requirements
pip install -r requirements.txt
- Run Migrations
python manage.py migrate
- Run DiscoFlix
sh ./run.sh
You will need to get the IP address of the computer hosting DiscoFlix. On Windows, you would typically type ipconfig
on the host machine and look for your ipv4
.
If you are hosting DiscoFlix (using Docker) on the same machine that you are hosting Radarr & Sonarr, you might not be able to access your Radarr & Sonarr using
http://localhost:<port>
, as that would be referencing the localhost of the docker container itself. Instead, usehttp://host.docker.internal:<port>
- consider this thelocalhost
of the machine hosting the docker container. In some cases, this may not be an issue.
If you would like to access DiscoFlix remotely, as in not on the same network as the host machine, you will need to do some port forwarding to expose port 5454 to the internet. Run into trouble? Feel free to join the Discord!
DiscoFlix requires a small amount of configuration before you can begin making requests. Discord Token + Radarr and/or Sonarr URL and Token, depending on your use case. If you plan to only use Radarr, disable the Sonarr switch in your configuration menu. Same goes for only using Sonarr.
To get your Discord Token, go to the "bot" tab in your developer portal. You may need to click "reset Token" and/or enter authentication code if you have 2FA enabled. Make sure to enable all Privileged Gateway Intents
)
If you haven't already, now is also a good time to invite the bot to the server or servers you would like to monitor, you can do that via the Discord Developer Portal. Admin access is the only level we have tested. Anything less may result in errors.
Type the following into a discord chat message that the bot can see:
!df test
Test that the bot is able to access Radarr/Sonarr by making your first test request. Let's use "Dark Phoenix" as an example.
!df movie Dark Phoenix
We can also test our Sonarr requests. Let's try "Cyberpunk Edgerunners".
!df show Cyberpunk Edgerunners
Looks like we already have that on our server, or it's already being monitored!
To see the commands available to you, type !df help
. DiscoFlix should respond with a table containing some or all of the below commands.
Command | Aliases | Description | Usage |
---|---|---|---|
Test | test | Confirm bot is on and listening | !df test |
Help | help | Display all authorized commands. | !df help |
Echo | echo | Confirm bot is handling input as intended. | !df echo <text to echo> |
Error | error, err, raise | Confirm bot is handling errors as intended | !df error [-s] |
Log | log, add-log | Confirm bot is logging information to console as intended | !df log <text to log> |
Movie | movie, add-movie | Request a movie | !df movie <title> |
Show | show, add-show, tv-show, add-tv-show, tv, tvshow | Request a tv-show | !df show <title> |
User | user, add-user, add | Add a user | !df user <user_to_add> |
The above commands assume that your command prefix is set to the default
!df
. Adjust accordingly.
Keep in mind that you will need to mark yourself as "server owner" in the user control panel to use the debug commands.
Or just view the docs.
- For any other comments or questions, feel free to reach me on discord via NicholasHeyer#4212
- Feel free to join the Discord!
Contributions are always welcome!
Email nick@heyer.app
for ways to get started.