plex_notifier
Table of Contents
Description
A little Python program that queries a Plex server for recently added media and sends an email to the subscribed users with a list of said media.
Setup
Requirements
Tusk
Tusk is a task runner built in go that makes it easy to get started and work within the confines of a project. You can read all about the project at the link listed above.
How is Tusk Used
For this project Tusk is ust to setup pipenv
to manage python vitualenvs and
dependencies. It is also used to run the test suite (pytest
and pylint
);
which can be run separately if needed. Lastly it is used to run the application
itself.
Running tusk -h
will give a full output of Tasks and Global Options. tusk <task> -h
will give detailed information on the different tasks. The tasks used
most are tusk bootstrap
to get started with the project and tusk test_suite
to run the test suite.
Setting Parameters
The program takes a mix of required and optional parameters. There are some dependent parameters that become required based on the value of others. Currently all parameters are set through environment variables but in the future the option of commandline arguments will be given.
-
plex_username
:- Set from the environment parameter
PLEX_USERNAME
- Required
- Set from the environment parameter
-
plex_password
:- Set from the environment parameter
PLEX_PASSWORD
- Required
- Set from the environment parameter
-
plex_server
:- Set from the environment Parameter
PLEX_SERVER
- Required
- Set from the environment Parameter
-
days_passed
:- Set from the environment parameter
PLEX_DAYS_PASSED
- The number of days to go back to find recently added media
- Required
- Set from the environment parameter
-
send_mail
:- Set from the environment parameter
PLEX_SEND_MAIL
- Whether or not to send the update email
- Optional (values: true/false; default: false)
- Set from the environment parameter
-
email_username
:- Set from the environment parameter
PLEX_EMAIL_USERNAME
- The username for the email address sending the mail
- Optional unless
send_mail
istrue
- Set from the environment parameter
-
email_password
:- Set from the environment parameter
PLEX_EMAIL_PASSWORD
- The password for the email address sending the mail
- Optional unless
send_mail
istrue
- Set from the environment parameter
-
unsub_emails
:- Set from the environment parameter
PLEX_UNSUB_EMAIL
- Comma separated string of emails to omit from sending
- Optional
- Set from the environment parameter
Limitations
Currently only the Movies
and TV Shows
sections are queried, parsed and
formatted.
Currently the only mail provider supported is Gmail. This most likely will not change.
Disclaimers
This is minimal viable product but stable. Features and test coverage are limited. More robust features, testing and build pipeline are on the roadmap.
Contributions
This is an open source project under the MIT license. All contributions are welcome. Feel free to submit issues or open pull requests for already opened issues. For the foreseeable future the contributing guidelines will remain simple.
- Fork the project
- Cut a feature branch
- Write tests
- Squash commits
- Open pull request to
develop
branch