Giter Site home page Giter Site logo

nitantsoni / plex_playlist_generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robobeaver6/plex_playlist_generator

0.0 0.0 0.0 26 KB

Generate a playlist of an arbatory Length on a Plex server for the next unplayed episode from random TV shows in the Library

Python 100.00%

plex_playlist_generator's Introduction

Plex Random Series Playlist Generator

Simple script to generate a playlist on a plex server that randomises the series, but plays the episodes within that series in order.

##Usage

usage: playlist_generator.py [-h] [--name NAME] [--number NUMBER] [--server]
                             [--baseurl BASEURL] [--token TOKEN] [--account]
                             [--username USERNAME] [--password PASSWORD]
                             [--resource RESOURCE] [--ignore-skipped]
                             [--randomize] [--include-watched] [--debug]

Create playlist of unwatched episodes from random shows but in correct episode
order.

optional arguments:
  -h, --help                    show this help message and exit
  --name NAME                   Playlist Name
  --number NUMBER, -n NUMBER    Number of episodes to add to play list
  --debug, -d                   Debug Logging
  --scheduled, -s		Run the script in scheduled job mode
  --blacklist			Path to the blacklist.txt file. Default is current directory

Server Connection Method:
  --server                      Server connection Method
  --baseurl BASEURL, -b BASEURL Base URL of Server
  --token TOKEN, -t TOKEN   Authentication Token

Plex Account Connection Method:
  --account              Account Connection Method
  --username USERNAME, -u USERNAME   Plex Account Username
  --password PASSWORD, -p PASSWORD   Plex AccountPassword
  --resource RESOURCE, -r RESOURCE   Resource Name (Plex Server Name)

Episode Selection Behaviour:
  --include-watched     include watched episodes, in random order

Connection Methods

Account

Uses your PlexTV Account, username and Resource Name (Server Name)
e.g. playlist_generator.py --account --username MyUserName --password Sh1tPass --resource MyServer

Server

Uses The Server URL and Authentication Token
e.g. playlist_generator.py --server --baseurl "http://172.16.1.100:32400" --token "fR5GrDxfLunKynNub5"

Authentication Token

To get your Auth token, browse to an episode in the web UI. Click on the ... video and select Get Info. In the popup window select View XML in the URL there is the X-Plex-Token=XXXXXXXXXXXXXX

Blacklist

The Blacklist is read from an external file. Path can be optionally specified via the --blacklist argument. Defaults to "./blacklist.txt". A sample blacklist has been included. Add the shows to not include here and rename it to "blacklist.txt" e.g. playlist_generator.py --server --baseurl "http://172.16.1.100:32400" --token "fR5GrDxfLunKynNub5" --blacklist "path/to/blacklist.txt"

Season 0 Specials Handling

Episodes from Season 0 are now handled differently than the parent script. Incase the "Include Watched" option is selected, they are not added to the final playlist. Otherwise in normal mode, they are added once all other episodes have been marked as watched.

Episode Selection

This now works differently from the parent script. The script will now ensure TV Shows are spaced out snd repetition is kept to a minimum. Each playlist entry will be from a different show if possible.

Scheduled Job Mode

In this mode, the script will only run if 5 or less unwatched items remain in the playlist

plex_playlist_generator's People

Contributors

nitantsoni avatar robobeaver6 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.