Plex Observer is a Discord bot that monitors a Plex server and updates the bot's status based on the number of available slots on the server.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.11
- Poetry
- Clone the repo
git clone https://github.com/GuiEpi/plex-observer.git- Navigate to the project directory
cd plex-observer- Set the Python version for the environment
poetry env use 3.11- Install dependencies
poetry installNote: The project uses Python 3.11 due to an issue with the multidict dependency in Python 3.12.
Plex Observer requires minimal configuration to function. You need to provide a Discord bot token and Plex credentials (either a username and password or a baseurl and token).
An minimal example configuration file is provided as example.config.ini. Simply replace <discord-bot-token>, <plex-username> and <plex-username> with yours and rename the file to config.ini.
Here's an example of a fully specified config.ini file:
[settings]
places = 10
interval = 10
[discord]
token = NDY3NzE1NTAbUjYwMzg2ODI2.DiuplA.T336twFYOlzcHqcU1xV5skYyHX0
token_dev = BuZbzE1NTAyJIUhdvYwMzg2ODI2.JaopjB.T529twFYOlzcHqcU1uEK78jx
[plex]
username = johndoe
password = kodi-stinks
baseurl = http://127.0.0.1:32400
token = XBHSMSJSDJ763JSmTo run Plex Observer, execute the following command:
poetry run python3 src/main.pyYou can specify the environment (prod or dev) with the -e or --env argument:
poetry run python3 src/main.py --env devYou can also deploy Plex Observer using Docker:
docker build -t plex-observer .
docker run -d plex-observer
-t plex-observer: This flag is used in thedocker buildcommand. The-tstands for "tag". It tags the image with the nameplex-observerso you can easily refer to the image later.-d: This flag is used in thedocker runcommand. The-dstands for "detached". It means that Docker will run your container in the background and print the container ID.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License.
