https://github.com/guiepi/plex-observer
Plex observer is a bot discord created for people who have a plex server with limited resources. You can define a number of seats and once the bot is deployed it will let you know which people are connected and therefore which seats are left.
https://github.com/guiepi/plex-observer
discord-bot plex pycord python-plexapi
Last synced: 3 months ago
JSON representation
Plex observer is a bot discord created for people who have a plex server with limited resources. You can define a number of seats and once the bot is deployed it will let you know which people are connected and therefore which seats are left.
- Host: GitHub
- URL: https://github.com/guiepi/plex-observer
- Owner: GuiEpi
- License: mit
- Created: 2023-03-10T23:06:03.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-21T18:18:47.000Z (over 1 year ago)
- Last Synced: 2025-01-04T13:09:47.660Z (5 months ago)
- Topics: discord-bot, plex, pycord, python-plexapi
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Plex Observer
[](https://github.com/psf/black)
[](https://python-poetry.org/)
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.
## 🚀 Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- Python 3.11
- [Poetry](https://python-poetry.org/docs/)### Installation
1. Clone the repo
```bash
git clone https://github.com/GuiEpi/plex-observer.git
```
2. Navigate to the project directory
```bash
cd plex-observer
```
3. Set the Python version for the environment
```bash
poetry env use 3.11
```
4. Install dependencies
```bash
poetry install
```
> Note: The project uses Python 3.11 due to an issue with the multidict dependency in Python 3.12.## ⚙️ Configuration
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 ``, `` and `` with yours and rename the file to `config.ini`.
Here's an example of a fully specified `config.ini` file:
```ini
[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 = XBHSMSJSDJ763JSm
```## 🕹 Usage
To run Plex Observer, execute the following command:
```bash
poetry run python3 src/main.py
```
You can specify the environment (prod or dev) with the -e or --env argument:
```bash
poetry run python3 src/main.py --env dev
```## 🐳 Docker Deployment
You can also deploy Plex Observer using Docker:
```bash
docker build -t plex-observer .
docker run -d plex-observer
```
> * `-t plex-observer`: This flag is used in the `docker build` command. The `-t` stands for "tag". It tags the image with the name `plex-observer` so you can easily refer to the image later.
> * `-d`: This flag is used in the `docker run` command. The `-d` stands for "detached". It means that Docker will run your container in the background and print the container ID.## 🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.## 📝 License
This project is licensed under the MIT License.