media.plex#

Description#

Plugin to interact with a Plex media server.

Configuration#

media.plex:
  # [Required]
  # Plex server name
  server:

  # [Required]
  # Plex username
  username:

  # [Required]
  # Plex password
  password:

Dependencies#

pip

pip install plexapi

Actions#

Module reference#

class platypush.plugins.media.plex.MediaPlexPlugin(server, username, password, **kwargs)[source]#

Bases: Plugin

Plugin to interact with a Plex media server.

__init__(server, username, password, **kwargs)[source]#
Parameters:
  • server (str) – Plex server name

  • username (str) – Plex username

  • password – Plex password

back(client)[source]#

Backward playback on a client

down(client)[source]#

Send a down key event to a client

forward(client)[source]#

Forward playback on a client

get_clients()[source]#

Get the list of active clients

go_back(client)[source]#

Send a back key event to a client

go_home(client)[source]#

Send a home key event to a client

go_to_media(client)[source]#

Send a go to media event to a client

go_to_music(client)[source]#

Send a go to music event to a client

history()[source]#

Get the history of items played on the server

left(client)[source]#

Send a left key event to a client

next(client)[source]#

Play next item on a client

next_letter(client)[source]#

Send a next letter event to a client

page_down(client)[source]#

Send a page down event to a client

page_up(client)[source]#

Send a page up event to a client

pause(client)[source]#

Send pause event to a client

play(client=None, chromecast=None, **kwargs)[source]#

Search and play content on a client or a Chromecast. If no search filter is specified, a play event will be sent to the specified client.

NOTE: Adding and managing play queues through the Plex API isn’t fully supported yet, therefore in case multiple items are returned from the search only the first one will be played.

Parameters:
  • client (str) – Client name

  • chromecast (str) – Chromecast name

  • kwargs (dict) – Search filter (e.g. title, section, unwatched, director etc.)

playlists()[source]#

Get the playlists on the server

previous(client)[source]#

Play previous item on a client

random(client, random)[source]#

Set the random status on a client

repeat(client, repeat)[source]#

Set the repeat status on a client

right(client)[source]#

Send a right key event to a client

search(section=None, title=None, **kwargs)[source]#

Return all the items matching the search criteria (default: all library items)

Parameters:
  • section (str) – Section to search (Movies, Shows etc.)

  • title (str) – Full or partial title

  • kwargs (dict) – Search criteria - includes e.g. title, unwatched, director, genre etc.

seek(client, offset)[source]#

Send seek event to a client

set_volume(client, volume)[source]#

Set the volume on a client between 0 and 100

stop(client)[source]#

Send stop event to a client

up(client)[source]#

Send an up key event to a client