Add more source media parameters

This commit is contained in:
JonnyWong16 2017-02-26 16:00:32 -08:00
parent c01731ebe9
commit a46b24213b
7 changed files with 454 additions and 212 deletions

View file

@ -75,36 +75,36 @@ DOCUMENTATION :: END
% endif
<div class="dashboard-activity-poster" id="poster-${data['session_key']}">
% if not data['art'].startswith('interfaces') or not data['thumb'].startswith('interfaces'):
% if (data['media_type'] == 'movie' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
% elif (data['media_type'] == 'episode' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
% elif data['indexes']:
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['bif_thumb']}&width=500&height=280&fallback=art); display: none;"></div>
% else:
% if data['media_type'] == 'track':
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
% elif data['media_type'] == 'clip':
% if data['art'].startswith('http'):
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
% elif data['thumb'].startswith('http'):
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
% else:
% if data['art']:
<!--Hacky solution to escape the image url until I come up with something better-->
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['art'])}&width=500&height=280&fallback=art);"></div>
% else:
<!--Hacky solution to escape the image url until I come up with something better-->
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['thumb'])}&width=500&height=280&fallback=art);"></div>
% endif
% endif
% elif data['media_type'] == 'photo':
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);"></div>
% else:
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
% endif
% endif
% if (data['media_type'] == 'movie' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
% elif (data['media_type'] == 'episode' and not data['indexes']) or (data['indexes'] and not data['view_offset']):
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
% elif data['indexes']:
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['bif_thumb']}&width=500&height=280&fallback=art); display: none;"></div>
% else:
% if data['media_type'] == 'track':
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
% elif data['media_type'] == 'clip':
% if data['art'].startswith('http'):
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
% elif data['thumb'].startswith('http'):
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
% else:
% if data['art']:
<!--Hacky solution to escape the image url until I come up with something better-->
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['art'])}&width=500&height=280&fallback=art&clip=true);"></div>
% else:
<!--Hacky solution to escape the image url until I come up with something better-->
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${quote(data['thumb'])}&width=500&height=280&fallback=art&clip=true);"></div>
% endif
% endif
% elif data['media_type'] == 'photo':
<div id="bif-${data['session_key']}" class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=cover);"></div>
% else:
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=300&fallback=cover);"></div>
% endif
% endif
% else:
<div class="dashboard-activity-poster-face" style="background-image: url(${data['art']});"></div>
% endif

View file

@ -1586,13 +1586,21 @@
<td><strong>{username}</strong></td>
<td>The username of the person streaming.</td>
</tr>
<tr>
<td><strong>{device}</strong></td>
<td>The type of client device being used for playback.</td>
</tr>
<tr>
<td><strong>{platform}</strong></td>
<td>The type of client being used for playback.</td>
<td>The type of client platform being used for playback.</td>
</tr>
<tr>
<td><strong>{product}</strong></td>
<td>The type of client product being used for playback.</td>
</tr>
<tr>
<td><strong>{player}</strong></td>
<td>The name of the device being used for playback.</td>
<td>The name of the player being used for playback.</td>
</tr>
<tr>
<td><strong>{ip_address}</strong></td>
@ -1644,12 +1652,16 @@
</tr>
<tr>
<td><strong>{quality_profile}</strong></td>
<td>The Plex quality profile of the stream. <span class="small-muted">(e.g. 4 Mbps 720p)</span></td>
<td>The Plex quality profile of the stream. <span class="small-muted">(e.g. Original, 4 Mbps 720p, etc.)</span></td>
</tr>
<tr>
<td><strong>{optimized_version}</strong></td>
<td>If the stream is an optimized version. <span class="small-muted">(0 or 1)</span></td>
</tr>
<tr>
<td><strong>{optimized_version_profile}</strong></td>
<td>The optimized version profile of the stream.</td>
</tr>
<tr>
<td><strong>{stream_local}</strong></td>
<td>If the stream is local. <span class="small-muted">(0 or 1)</span></td>
@ -1681,14 +1693,26 @@
<td><strong>{stream_video_codec}</strong></td>
<td>The video codec of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_codec_level}</strong></td>
<td>The video codec level of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_bitrate}</strong></td>
<td>The video bitrate (in kbps) of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_bit_depth}</strong></td>
<td>The video bit depth of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_framerate}</strong></td>
<td>The video framerate of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_ref_frames}</strong></td>
<td>The video reference frames of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_resolution}</strong></td>
<td>The video resolution of the stream.</td>
@ -1715,7 +1739,7 @@
</tr>
<tr>
<td><strong>{stream_audio_bitrate_mode}</strong></td>
<td>The audio bitrage mode of the stream. <span class="small-muted">(cbr or vbr)</span></td>
<td>The audio bitrate mode of the stream. <span class="small-muted">(cbr or vbr)</span></td>
</tr>
<tr>
<td><strong>{stream_audio_codec}</strong></td>
@ -1725,6 +1749,14 @@
<td><strong>{stream_audio_channels}</strong></td>
<td>The audio channels of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_channel_layout}</strong></td>
<td>The audio channel layout of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_sample_rate}</strong></td>
<td>The audio sample rate (in Hz) of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_language}</strong></td>
<td>The audio language of the stream.</td>
@ -1745,6 +1777,10 @@
<td><strong>{stream_subtitle_format}</strong></td>
<td>The subtitle format of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_forced}</strong></td>
<td>If the subtitles are forced. <span class="small-muted">(0 or 1)</span></td>
</tr>
<tr>
<td><strong>{stream_subtitle_language}</strong></td>
<td>The subtitle language of the stream.</td>
@ -1820,46 +1856,6 @@
<td><strong>{media_type}</strong></td>
<td>The type of media. <span class="small-muted">(movie, show, season, episode, artist, album, track)</span></td>
</tr>
<tr>
<td><strong>{container}</strong></td>
<td>The media container of the original media.</td>
</tr>
<tr>
<td><strong>{aspect_ratio}</strong></td>
<td>The aspect ratio of the original media.</td>
</tr>
<tr>
<td><strong>{video_codec}</strong></td>
<td>The video codec of the original media.</td>
</tr>
<tr>
<td><strong>{video_bitrate}</strong></td>
<td>The video bitrate of the original media.</td>
</tr>
<tr>
<td><strong>{video_framerate}</strong></td>
<td>The video framerate of the original media.</td>
</tr>
<tr>
<td><strong>{video_resolution}</strong></td>
<td>The video resolution of the original media.</td>
</tr>
<tr>
<td><strong>{video_width}</strong></td>
<td>The video width of the original media.</td>
</tr>
<tr>
<td><strong>{video_height}</strong></td>
<td>The video height of the original media.</td>
</tr>
<tr>
<td><strong>{audio_codec}</strong></td>
<td>The audio codec of the original media.</td>
</tr>
<tr>
<td><strong>{audio_channels}</strong></td>
<td>The audio channels of the original media.</td>
</tr>
<tr>
<td><strong>{title}</strong></td>
<td>The full title of the item.</td>
@ -2037,6 +2033,118 @@
<td><strong>{trakt_url}</strong></td>
<td>The trakt.tv URL for the movie or TV show.</td>
</tr>
<tr>
<td><strong>{container}</strong></td>
<td>The media container of the original media.</td>
</tr>
<tr>
<td><strong>{bitrate}</strong></td>
<td>The bitrate of the original media.</td>
</tr>
<tr>
<td><strong>{aspect_ratio}</strong></td>
<td>The aspect ratio of the original media.</td>
</tr>
<tr>
<td><strong>{video_codec}</strong></td>
<td>The video codec of the original media.</td>
</tr>
<tr>
<td><strong>{video_codec_level}</strong></td>
<td>The video codec level of the original media.</td>
</tr>
<tr>
<td><strong>{video_bitrate}</strong></td>
<td>The video bitrate of the original media.</td>
</tr>
<tr>
<td><strong>{video_bit_depth}</strong></td>
<td>The video bit depth of the original media.</td>
</tr>
<tr>
<td><strong>{video_framerate}</strong></td>
<td>The video framerate of the original media.</td>
</tr>
<tr>
<td><strong>{video_ref_frames}</strong></td>
<td>The video reference frames of the original media.</td>
</tr>
<tr>
<td><strong>{video_resolution}</strong></td>
<td>The video resolution of the original media.</td>
</tr>
<tr>
<td><strong>{video_height}</strong></td>
<td>The video height of the original media.</td>
</tr>
<tr>
<td><strong>{video_width}</strong></td>
<td>The video width of the original media.</td>
</tr>
<tr>
<td><strong>{video_language}</strong></td>
<td>The video language of the original media.</td>
</tr>
<tr>
<td><strong>{video_language_code}</strong></td>
<td>The video language code of the original media.</td>
</tr>
<tr>
<td><strong>{audio_bitrate}</strong></td>
<td>The audio bitrate of the original media.</td>
</tr>
<tr>
<td><strong>{audio_bitrate_mode}</strong></td>
<td>The audio bitrate mode of the original media. <span class="small-muted">(cbr or vbr)</span></td>
</tr>
<tr>
<td><strong>{audio_codec}</strong></td>
<td>The audio codec of the original media.</td>
</tr>
<tr>
<td><strong>{audio_channels}</strong></td>
<td>The audio channels of the original media.</td>
</tr>
<tr>
<td><strong>{audio_channel_layout}</strong></td>
<td>The audio channel layout of the original media.</td>
</tr>
<tr>
<td><strong>{audio_language}</strong></td>
<td>The audio language of the original media.</td>
</tr>
<tr>
<td><strong>{audio_language_code}</strong></td>
<td>The audio language code of the original media.</td>
</tr>
<tr>
<td><strong>{subtitle_codec}</strong></td>
<td>The subtitle codec of the original media.</td>
</tr>
<tr>
<td><strong>{subtitle_container}</strong></td>
<td>The subtitle container of the original media.</td>
</tr>
<tr>
<td><strong>{subtitle_format}</strong></td>
<td>The subtitle format of the original media.</td>
</tr>
<tr>
<td><strong>{subtitle_forced}</strong></td>
<td>If the subtitles are forced. <span class="small-muted">(0 or 1)</span></td>
</tr>
<tr>
<td><strong>{subtitle_location}</strong></td>
<td>The subtitle location of the original media.</td>
</tr>
<tr>
<td><strong>{subtitle_language}</strong></td>
<td>The subtitle language of the original media.</td>
</tr>
<tr>
<td><strong>{subtitle_language_code}</strong></td>
<td>The subtitle language code of the original media.</td>
</tr>
<tr>
<td><strong>{file}</strong></td>
<td>The file path to the item.</td>