<%doc> USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/ Filename: current_activity.html Version: 0.1 Variable names: data [list] data :: Usable parameters data['stream_count'] Returns the current number of active streams data['sessions'] Returns an array containing session data data[sessions] :: Usable parameters == Global keys == sessionKey Returns a unique session id for the active stream ratingKey Returns the unique identifier for the media item. type Returns the type of session. Either 'track', 'episode' or 'movie'. thumb Returns the location of the item's thumbnail. Use with pms_image_proxy. art Returns the location of the item's artwork progress_percent Returns the current progress of the item. 0 to 100. user Returns the name of the user owning the session. friendly_name Returns the friendlly name of the user owning the session. state Returns the state of the current session. Either 'playing', 'paused' or 'buffering'. title Returns the name of the episode, movie or music track. player Returns the name of the platform used to play the stream. audioDecision Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'. audioCodec Returns the name of the audio codec. audioChannels Returns the number of audio channels. == Only if 'type' is 'episode' == grandparentTitle Returns the name of the TV Show. == Only if 'type' is 'track' == artist Returns the name of the artist of a music track. album Returns the name of the album of the music track. == Only if 'type' is 'episode' or 'movie' == videoDecision Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'. videoCodec Returns the name of the video codec. height Returns the value of the video height. width Returns the value of the video width. indexes Returns true if the media has media indexes and are enabled DOCUMENTATION :: END % if data is not None: % if data['stream_count'] != '0': % for a in data['sessions']:
% if a['type'] == 'movie' and not a['indexes']:
% elif a['indexes']:
% else:
% endif
${a['progressPercent']}%
${a['friendly_name']} is ${a['state']}
% if a['type'] == 'episode': ${a['grandparentTitle']} - ${a['title']} % elif a['type'] == 'movie': ${a['title']} % elif a['type'] == 'track': ${a['artist']} - ${a['track']} % else: ${a['grandparentTitle']} - ${a['title']} % endif
% if a['type'] == 'track': Artist: ${a['artist']}
Album: ${a['album']}
% endif % if a['state'] == 'playing': State: Playing % elif a['state'] == 'paused': State: Paused % elif a['state'] == 'buffering': State: Buffering % endif
% if a['type'] == 'track': % if a['audioDecision'] == 'direct play': Stream: Direct Play % else: Stream: Transcoding % endif
Audio: ${a['audioCodec']} (${a['audioChannels']}ch) % elif a['type'] == 'episode' or a['type'] == 'movie': % if a['videoDecision'] == 'direct play': Stream: Direct Play % else: Stream: Transcoding % endif
Video: ${a['videoDecision']} (${a['videoCodec']}) (${a['width']}x${a['height']})
Audio: ${a['audioDecision']} (${a['audioCodec']}) (${a['audioChannels']}ch) % endif
% endfor
% else:
Nothing is currently being watched.
% endif % else:
There was an error communicating with your Plex Server. Please check your settings.
% endif