Giter Site home page Giter Site logo

guiepi / plex-observer Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 19 KB

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.

License: MIT License

Dockerfile 7.36% Python 92.64%
discord-bot plex pycord python-plexapi

plex-observer's Introduction

Project Image

Plex Observer

Code style: black Poetry Python 3.11

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

Installation

  1. Clone the repo
git clone https://github.com/GuiEpi/plex-observer.git
  1. Navigate to the project directory
cd plex-observer
  1. Set the Python version for the environment
poetry env use 3.11
  1. Install dependencies
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 <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 = XBHSMSJSDJ763JSm

๐Ÿ•น Usage

To run Plex Observer, execute the following command:

poetry run python3 src/main.py

You can specify the environment (prod or dev) with the -e or --env argument:

poetry run python3 src/main.py --env dev

๐Ÿณ Docker Deployment

You 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 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.

plex-observer's People

Contributors

guiepi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.