Play a random chapter of your favorite series, like The Simpsons, Futurama, Friends...
With this program you can:
- Define multiple directories as a source.
- Optional support for subdirectories.
- Use patterns to filter files.
- Choose a video player, or let it choose one automatically.
- Native support for chromecast.
By default, it plays a video of the current directory with the default player.
# Use current directory
$ random-player
The syntax is:
$ random-player[ --config <config_path>][ <player>[ <playlist>]]
The available parameters are:
<config_path>
: by default it israndom-episode.yml
.<player>
: by default it isnative
(default video player).chromecast
is also available.
You can define others in the configuration.
* <playlist>
: you must define the playlists in the configuration.
Using a configuration file you can define playlists and players. An example:
# random-episode.yml
# ------------------
playlists:
groening: # playlist name
directories: # Multiple directories
- '/path/to/simpsons/'
- '/path/to/futurama/'
recursive: true # Optional
patterns: # Optional
- '*.mkv' # file pattern
- '*.mp4'
- '*.avi'
simpsons-t1: # playlist name
directories: '/path/to/simpsons/The Simpsons/'
patterns: 'The Simpsons 1x*'
players:
bedroom-chromecast: # player name
type: chromecast # chromecast or native
# Chromecast name. Useful if you have more than one
name: bedroom
vlc: # player name
# default type: native
cmd: vlc # command to execute
The options are:
- playlists:
- directories: required. A list or just one.
- recursive: optional.
true
orfalse
. Search for episodes recursively into subdirectories, - patterns: optional. A list or just one. Check the file names.
- players: by default chromecast (with type chromecast) and native (with type native).
- type: optional. By default native.
- cmd: Command to execute in native type.
If you have pip
installed, you can install it with:
sudo pip install random-episode
It's easy to use Random Episode with your Amazon Dash. You just need to install:
$ pip install amazon-dash
Then configure in Amazon Dash:
# amazon-dash.yml
# ---------------
44:65:0D:48:FA:88:
name: Pompadour
user: nekmo
cmd: random-episode chromecast simpsons
This project is under the 5B12 MIT license.
The Simpsons, The simpsons logo image and Futurama are owned by 20th Century Fox Television. Friends is owned by Warner Bros. Television.