Giter VIP home page Giter VIP logo

plex-notifications's Introduction

Plex Notifications

Plex Notifications is a tool to send regular updates to the people you share your Plex server with about what has been recently added.

This has been built on pkkid's awesome work on the python-plexapi

The tool will find all the new items in a single library section and format their data into an email that can also be automatically distributed

Email Sample

Setup

GMail account

First, a Gmail account will be needed for this to work - it is recommended to set up a new account specifically or this, or for all system related messaging, due to security requirements.

Go ahead and create one here

Plex server Remote Access

For these emails to work, the Plex server needs to be available externally. This can be done by following the instructions on the Plex Website

Configuration File

Inputs to this tool are set up in the plex-notifications.ini configuration file. Fill in the fields in the supplied file

[general]
NOTIFICATION_PERIOD     # Number of days to look back into library history
EMAIL_BLACKLIST         # List of users' emails that do not want to get emails

[plex]
PLEX_URL                # External URL (with port) to the Plex Server
PLEX_USER               # Admin Plex username
PLEX_PASS               # Admin Plex user password

[gmail]
GMAIL_USERNAME          # Email address of the GMail account
GMAIL_PASSWORD          # Password for the GMail account

Dependencies

It is recommended to install all the required libraries in a virtualenv to keep your system clean.

virtualenv venv -p $(which python3)
source venv/bin/activate

From there, install the libraries

pip install plexapi

Crontab

In it's current state, the tool will need to be run as part of a crontab timer to get regular updates. Future improvements could move this to a Plex plugin and use a better scheduling system. Please add the tool or it's run.sh to the crontab for a user with access to Plex

crontab -e

# Then add something like this
0 19 * * 5 /path/to/run.sh # Fires every Friday night at 7pm

To Do

  • Get Plex server credentials from environment variables
  • Only send emails if new items have been added
  • Fully document tool
  • Pull the user list from the server API
  • User white/black lists
  • Make all the options (inc. library name) configurable
  • Allow multiple libraries
  • Convert tool to a full plugin
  • Link to item in Plex (?)

plex-notifications's People

Contributors

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