The purpose of this application is to allow a chronological shuffling of tv shows. The selected TV Shows maybe shuffled however the episodes will be selected based on next unwatched, giving a network style tv guide.
NOTE: This is not a secure site, keep it within your local network. (no port forwarding)
- Allow users to select the plex server from which to source tv shows.
- Allow users to multi select tv shows from which shuffled (inclusive and exclusive) episodes will be selected.
- Allow users to save the selected tv shows as lists, making it easier to come back to the same list of shows.
- Allow users to set the max number of episodes that will be put in the plex queue.
- Allow users to push the generated episodes plex queue to a given client.
Currently only tested on LINUX systems. - Ubuntu 20.x - Manjaro 20.x
- Python3.8 or grater
- All packages in requirements.txt
- Download the git repo
- Install the requirements
pip3 install -r requirements.txt
- Generate and record a secret key.
python manage.py shell -c 'from django.core.management import utils; print(utils.get_random_secret_key())'
- Keep this handy for the next step
- Update the following parameters in
{INSTALL PATH}/PlexTvStation/settings.py
SECRET_KEY = "{KEY FROM STEP 3}" DEBUG = False
- This is done for application security
- Make migrations
python3 manage.py makemigrations python3 manage.py migrate
- Start the application
python3 manage.py runserver {IP}:{PORT}
- Create and Enable a service. (NOTE: Done under the
root
account, if you wish to use a different user, please use sudo when running systemctl commands)- Create service file
touch {INSTALL PATH}/PlexTvStation.service
- Edit the file with the following (Make sure you update all {} with the correct info)
[Unit] Description=Plex TV Station User={USER} After=network.target StartLimitIntervalSec=0 [Service] WorkingDirectory={INSTALL PATH} Type=simple Restart=always RestartSec=1 ExecStart={FULL PATH TO PYTHON3} {INSTALL PATH}/PlexTvStation/manage.py runserver {IP}:{PORT}
- Link the to service controller
systemctl link {INSTALL PATH}/PlexTvStation.service
- Reload daemon
systemctl daemon-reload
- Enable the service
systemctl enable PlexTvStation.service
- Will automatically start the service on boot.
- Start the service
systemctl start PlexTvStation.service
- Check to make sure the service started normally without errors
systemctl status PlexTvStation.service
- Check to make sure the service started normally without errors
- Create service file
- Starting and Stopping the service
- Start service
systemctl start PlexTvStation.service
- Stop service
systemctl stop PlexTvStation.service
- Start service
- You may have update
{INSTALL PATH}/PlexTvStation/settings.py
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "{IP}"]
- Read the log files at
{INSTALL PATH}/PlexTvStation/plextvstation/logs
- Read console outputs
journalctl -u PlexTvStation.service
- Google errors that might occur.