mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Fix centering last item on newsletter
This commit is contained in:
parent
45c646c062
commit
366e8514b6
6 changed files with 554 additions and 450 deletions
|
@ -952,7 +952,7 @@
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="newsletter_self_hosted" name="newsletter_self_hosted" value="1" ${config['newsletter_self_hosted']}> Self-Hosted Newsletters
|
<input type="checkbox" id="newsletter_self_hosted" name="newsletter_self_hosted" value="1" ${config['newsletter_self_hosted']}> Self-Hosted Newsletters
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">Enable to host newsletters on your own domain. </p>
|
<p class="help-block">Enable to host newsletters on your own domain. This will generate a link to an HTML page where you can view the newsletter.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="self_host_newsletter_options" style="overlfow: hidden; display: ${'block' if config['newsletter_self_hosted'] == 'checked' else 'none'}">
|
<div id="self_host_newsletter_options" style="overlfow: hidden; display: ${'block' if config['newsletter_self_hosted'] == 'checked' else 'none'}">
|
||||||
<p class="help-block" id="self_host_newsletter_message">Note: The <span class="inline-pre">${http_root}newsletter</span> endpoint on your domain must be publicly accessible from the internet.</p>
|
<p class="help-block" id="self_host_newsletter_message">Note: The <span class="inline-pre">${http_root}newsletter</span> endpoint on your domain must be publicly accessible from the internet.</p>
|
||||||
|
|
|
@ -374,6 +374,12 @@
|
||||||
min-width: 502px;
|
min-width: 502px;
|
||||||
max-width: 502px;
|
max-width: 502px;
|
||||||
}
|
}
|
||||||
|
.card-instance.pad {
|
||||||
|
padding: 0 !important;
|
||||||
|
width: 251px !important;
|
||||||
|
min-width: 251px !important;
|
||||||
|
max-width: 251px !important;
|
||||||
|
}
|
||||||
.card-instance.movie,
|
.card-instance.movie,
|
||||||
.card-instance.show {
|
.card-instance.show {
|
||||||
height: 233px;
|
height: 233px;
|
||||||
|
@ -382,6 +388,7 @@
|
||||||
height: 158px;
|
height: 158px;
|
||||||
}
|
}
|
||||||
.card-background {
|
.card-background {
|
||||||
|
background-color: #282828;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
@ -653,75 +660,86 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
% for movie_a, movie_b in grouper(recently_added['movie'], 2):
|
% for movie_a, movie_b in grouper(recently_added['movie'], 2):
|
||||||
<tr>
|
<tr>
|
||||||
% for movie in (movie_a, movie_b):
|
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
||||||
% if movie:
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
||||||
<td align="center" valign="top" class="card-instance movie" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;height: 233px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + movie['art_hash']) if base_url_image else movie['art_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="card-poster-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;width: 152px;min-width: 152px;height: 227px;">
|
% for movie in (movie_a, movie_b):
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + movie['thumb_hash']) if base_url_image else movie['poster_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #3F4245;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
% if movie:
|
||||||
|
% if not movie_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 0 !important;width: 251px !important;min-width: 251px !important;max-width: 251px !important;"></td>
|
||||||
|
% endif
|
||||||
|
<td align="center" valign="top" class="card-instance movie" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;height: 233px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + movie['art_hash']) if base_url_image else movie['art_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #282828;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
<td class="card-poster-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;width: 152px;min-width: 152px;height: 227px;">
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank" style="text-decoration: underline;">
|
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + movie['thumb_hash']) if base_url_image else movie['poster_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #3F4245;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
||||||
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;display: block;">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="card-info-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;padding-left: 4px;text-align: left;height: 227px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;height: 100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-title nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.9rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;border-bottom: 1px solid rgba(255, 255, 255, .1);line-height: 1.2rem;padding: 5px;">
|
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank" style="text-decoration: none;color: #ffffff;">${movie['title']}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-body" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.75rem;vertical-align: top;padding: 5px;height: 100%;">
|
|
||||||
% if movie['tagline']:
|
|
||||||
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
|
||||||
<em>${movie['tagline']}</em>
|
|
||||||
</p>
|
|
||||||
% endif
|
|
||||||
<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;">
|
|
||||||
${movie['summary'][:450] + (movie['summary'][450:] and '...')}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-footer nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.6rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;padding-top: 0px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="badge-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;max-width: 265px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
||||||
% if movie['year']:
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank" style="text-decoration: underline;">
|
||||||
<span class="badge" title="${movie['year']}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${movie['year']}</span>
|
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;display: block;">
|
||||||
% endif
|
</a>
|
||||||
% if movie['duration']:
|
|
||||||
<% duration = int(int(movie['duration'])/60000) %>
|
|
||||||
<span class="badge" title="${duration} mins" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${duration} mins</span>
|
|
||||||
% endif
|
|
||||||
% if movie['genres']:
|
|
||||||
% for genre in movie['genres'][:2]:
|
|
||||||
<span class="badge" title="${genre}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${genre}</span>
|
|
||||||
% endfor
|
|
||||||
% endif
|
|
||||||
</td>
|
</td>
|
||||||
% if movie['rating']:
|
</tr>
|
||||||
<% rating = int(round(float(movie['rating']) / 2)) %>
|
</tbody>
|
||||||
<td class="star-rating-container" title="${int(float(movie['rating'])/0.1)}%" align="right" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: bottom;width: 60px;padding-right: 5px;">
|
</table>
|
||||||
% for _ in range(rating):
|
</td>
|
||||||
<span class="star-rating full" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #E5A00D;">★</span>
|
<td class="card-info-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;padding-left: 4px;text-align: left;height: 227px;">
|
||||||
% endfor
|
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;height: 100%;">
|
||||||
% for _ in range(5-rating):
|
<tbody>
|
||||||
<span class="star-rating empty" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #aaaaaa;">☆</span>
|
<tr>
|
||||||
% endfor
|
<td class="card-info-title nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.9rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;border-bottom: 1px solid rgba(255, 255, 255, .1);line-height: 1.2rem;padding: 5px;">
|
||||||
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank" style="text-decoration: none;color: #ffffff;">${movie['title']}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-body" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.75rem;vertical-align: top;padding: 5px;height: 100%;">
|
||||||
|
% if movie['tagline']:
|
||||||
|
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
||||||
|
<em>${movie['tagline']}</em>
|
||||||
|
</p>
|
||||||
|
% endif
|
||||||
|
<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;">
|
||||||
|
${movie['summary'][:450] + (movie['summary'][450:] and '...')}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-footer nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.6rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;padding-top: 0px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="badge-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;max-width: 265px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
|
% if movie['year']:
|
||||||
|
<span class="badge" title="${movie['year']}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${movie['year']}</span>
|
||||||
|
% endif
|
||||||
|
% if movie['duration']:
|
||||||
|
<% duration = int(int(movie['duration'])/60000) %>
|
||||||
|
<span class="badge" title="${duration} mins" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${duration} mins</span>
|
||||||
|
% endif
|
||||||
|
% if movie['genres']:
|
||||||
|
% for genre in movie['genres'][:2]:
|
||||||
|
<span class="badge" title="${genre}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${genre}</span>
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
</td>
|
||||||
|
% if movie['rating']:
|
||||||
|
<% rating = int(round(float(movie['rating']) / 2)) %>
|
||||||
|
<td class="star-rating-container" title="${int(float(movie['rating'])/0.1)}%" align="right" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: bottom;width: 60px;padding-right: 5px;">
|
||||||
|
% for _ in range(rating):
|
||||||
|
<span class="star-rating full" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #E5A00D;">★</span>
|
||||||
|
% endfor
|
||||||
|
% for _ in range(5-rating):
|
||||||
|
<span class="star-rating empty" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #aaaaaa;">☆</span>
|
||||||
|
% endfor
|
||||||
|
</td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -730,14 +748,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
% if not movie_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 0 !important;width: 251px !important;min-width: 251px !important;max-width: 251px !important;"></td>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% else:
|
|
||||||
<td align="center" valign="top" class="card-instance" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;"></td>
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -765,108 +784,119 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
% for show_a, show_b in grouper(recently_added['show'], 2):
|
% for show_a, show_b in grouper(recently_added['show'], 2):
|
||||||
<tr>
|
<tr>
|
||||||
% for show in (show_a, show_b):
|
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
||||||
% if show:
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
||||||
<%
|
|
||||||
if show['season_count'] == 1:
|
|
||||||
if show['season'][0]['episode_count'] == 1:
|
|
||||||
link_rating_key = show['season'][0]['episode'][0]['rating_key']
|
|
||||||
else:
|
|
||||||
link_rating_key = show['season'][0]['episode'][0]['parent_rating_key']
|
|
||||||
else:
|
|
||||||
link_rating_key = show['rating_key']
|
|
||||||
%>
|
|
||||||
<td align="center" valign="top" class="card-instance show" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;height: 233px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + show['art_hash']) if base_url_image else show['art_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="card-poster-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;width: 152px;min-width: 152px;height: 227px;">
|
% for show in (show_a, show_b):
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + show['thumb_hash']) if base_url_image else show['poster_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #3F4245;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
% if show:
|
||||||
|
% if not show_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 0 !important;width: 251px !important;min-width: 251px !important;max-width: 251px !important;"></td>
|
||||||
|
% endif
|
||||||
|
<%
|
||||||
|
if show['season_count'] == 1:
|
||||||
|
if show['season'][0]['episode_count'] == 1:
|
||||||
|
link_rating_key = show['season'][0]['episode'][0]['rating_key']
|
||||||
|
else:
|
||||||
|
link_rating_key = show['season'][0]['episode'][0]['parent_rating_key']
|
||||||
|
else:
|
||||||
|
link_rating_key = show['rating_key']
|
||||||
|
%>
|
||||||
|
<td align="center" valign="top" class="card-instance show" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;height: 233px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + show['art_hash']) if base_url_image else show['art_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #282828;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
<td class="card-poster-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;width: 152px;min-width: 152px;height: 227px;">
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank" style="text-decoration: underline;">
|
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + show['thumb_hash']) if base_url_image else show['poster_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #3F4245;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
||||||
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;display: block;">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="card-info-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;padding-left: 4px;text-align: left;height: 227px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;height: 100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-title nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.9rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;border-bottom: 1px solid rgba(255, 255, 255, .1);line-height: 1.2rem;padding: 5px;">
|
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank" style="text-decoration: none;color: #ffffff;">${show['title']}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-body" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.75rem;vertical-align: top;padding: 5px;height: 100%;">
|
|
||||||
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
|
||||||
% if show['season_count'] > 1:
|
|
||||||
<em>${show['season_count']} seasons /</em>
|
|
||||||
% endif
|
|
||||||
<% total_show_episodes = sum(s['episode_count'] for s in show['season']) %>
|
|
||||||
<em>${total_show_episodes} episode${'s' if total_show_episodes > 1 else ''}</em>
|
|
||||||
</p>
|
|
||||||
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
|
||||||
% for i, season in enumerate(show['season'][:8]):
|
|
||||||
Season ${season['media_index']} ·
|
|
||||||
% if season['episode_count'] == 1:
|
|
||||||
Episode ${season['episode'][0]['media_index']} - ${season['episode'][0]['title']}
|
|
||||||
% else:
|
|
||||||
Episodes ${season['episode_range']}
|
|
||||||
% endif
|
|
||||||
% if i < min(show['season_count'], 7):
|
|
||||||
<br>
|
|
||||||
% elif i == 7 and show['season_count'] > 8:
|
|
||||||
...plus ${show['season_count'] - 8} more seasons!
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</p>
|
|
||||||
<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;">
|
|
||||||
% if show['season_count'] == 1 and show['season'][0]['episode_count'] == 1:
|
|
||||||
${show['season'][0]['episode'][0]['summary'][:350] + (show['season'][0]['episode'][0]['summary'][350:] and '...')}
|
|
||||||
% else:
|
|
||||||
<% length = max(0, 350 - 50 * (show['season_count'] - 1)) %>
|
|
||||||
% if length:
|
|
||||||
${show['summary'][:length] + (show['summary'][length:] and '...')}
|
|
||||||
% endif
|
|
||||||
% endif
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-footer nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.6rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;padding-top: 0px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="badge-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;max-width: 265px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
||||||
% if show['year']:
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank" style="text-decoration: underline;">
|
||||||
<span class="badge" title="${show['year']}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${show['year']}</span>
|
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;display: block;">
|
||||||
% endif
|
</a>
|
||||||
% if show['duration']:
|
|
||||||
<% duration = int(int(show['duration'])/60000) %>
|
|
||||||
<span class="badge" title="${duration} mins" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${duration} mins</span>
|
|
||||||
% endif
|
|
||||||
% if show['genres']:
|
|
||||||
% for genre in show['genres'][:2]:
|
|
||||||
<span class="badge" title="${genre}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${genre}</span>
|
|
||||||
% endfor
|
|
||||||
% endif
|
|
||||||
</td>
|
</td>
|
||||||
% if show['rating']:
|
</tr>
|
||||||
<% rating = int(round(float(show['rating']) / 2)) %>
|
</tbody>
|
||||||
<td class="star-rating-container" title="${int(float(show['rating'])/0.1)}%" align="right" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: bottom;width: 60px;padding-right: 5px;">
|
</table>
|
||||||
% for _ in range(rating):
|
</td>
|
||||||
<span class="star-rating full" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #E5A00D;">★</span>
|
<td class="card-info-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;padding-left: 4px;text-align: left;height: 227px;">
|
||||||
% endfor
|
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;height: 100%;">
|
||||||
% for _ in range(5-rating):
|
<tbody>
|
||||||
<span class="star-rating empty" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #aaaaaa;">☆</span>
|
<tr>
|
||||||
% endfor
|
<td class="card-info-title nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.9rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;border-bottom: 1px solid rgba(255, 255, 255, .1);line-height: 1.2rem;padding: 5px;">
|
||||||
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank" style="text-decoration: none;color: #ffffff;">${show['title']}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-body" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.75rem;vertical-align: top;padding: 5px;height: 100%;">
|
||||||
|
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
||||||
|
% if show['season_count'] > 1:
|
||||||
|
<em>${show['season_count']} seasons /</em>
|
||||||
|
% endif
|
||||||
|
<% total_show_episodes = sum(s['episode_count'] for s in show['season']) %>
|
||||||
|
<em>${total_show_episodes} episode${'s' if total_show_episodes > 1 else ''}</em>
|
||||||
|
</p>
|
||||||
|
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
||||||
|
% for i, season in enumerate(show['season'][:8]):
|
||||||
|
Season ${season['media_index']} ·
|
||||||
|
% if season['episode_count'] == 1:
|
||||||
|
Episode ${season['episode'][0]['media_index']} - ${season['episode'][0]['title']}
|
||||||
|
% else:
|
||||||
|
Episodes ${season['episode_range']}
|
||||||
|
% endif
|
||||||
|
% if i < min(show['season_count'], 7):
|
||||||
|
<br>
|
||||||
|
% elif i == 7 and show['season_count'] > 8:
|
||||||
|
...plus ${show['season_count'] - 8} more seasons!
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
|
</p>
|
||||||
|
<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;">
|
||||||
|
% if show['season_count'] == 1 and show['season'][0]['episode_count'] == 1:
|
||||||
|
${show['season'][0]['episode'][0]['summary'][:350] + (show['season'][0]['episode'][0]['summary'][350:] and '...')}
|
||||||
|
% else:
|
||||||
|
<% length = max(0, 350 - 50 * (show['season_count'] - 1)) %>
|
||||||
|
% if length:
|
||||||
|
${show['summary'][:length] + (show['summary'][length:] and '...')}
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-footer nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.6rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;padding-top: 0px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="badge-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;max-width: 265px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
|
% if show['year']:
|
||||||
|
<span class="badge" title="${show['year']}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${show['year']}</span>
|
||||||
|
% endif
|
||||||
|
% if show['duration']:
|
||||||
|
<% duration = int(int(show['duration'])/60000) %>
|
||||||
|
<span class="badge" title="${duration} mins" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${duration} mins</span>
|
||||||
|
% endif
|
||||||
|
% if show['genres']:
|
||||||
|
% for genre in show['genres'][:2]:
|
||||||
|
<span class="badge" title="${genre}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${genre}</span>
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
</td>
|
||||||
|
% if show['rating']:
|
||||||
|
<% rating = int(round(float(show['rating']) / 2)) %>
|
||||||
|
<td class="star-rating-container" title="${int(float(show['rating'])/0.1)}%" align="right" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: bottom;width: 60px;padding-right: 5px;">
|
||||||
|
% for _ in range(rating):
|
||||||
|
<span class="star-rating full" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #E5A00D;">★</span>
|
||||||
|
% endfor
|
||||||
|
% for _ in range(5-rating):
|
||||||
|
<span class="star-rating empty" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #aaaaaa;">☆</span>
|
||||||
|
% endfor
|
||||||
|
</td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -875,14 +905,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
% if not show_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 0 !important;width: 251px !important;min-width: 251px !important;max-width: 251px !important;"></td>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% else:
|
|
||||||
<td align="center" valign="top" class="card-instance" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;"></td>
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -910,71 +941,82 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
% for album_a, album_b in grouper([a for artist in recently_added['artist'] for a in artist['album']], 2):
|
% for album_a, album_b in grouper([a for artist in recently_added['artist'] for a in artist['album']], 2):
|
||||||
<tr>
|
<tr>
|
||||||
% for album in (album_a, album_b):
|
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
||||||
% if album:
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
||||||
<td align="center" valign="top" class="card-instance album" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;height: 158px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + album['art_hash']) if base_url_image else album['art_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="card-poster-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;width: 152px;min-width: 152px;height: 152px;">
|
% for album in (album_a, album_b):
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + album['thumb_hash']) if base_url_image else album['poster_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #3F4245;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
% if album:
|
||||||
|
% if not album_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 0 !important;width: 251px !important;min-width: 251px !important;max-width: 251px !important;"></td>
|
||||||
|
% endif
|
||||||
|
<td align="center" valign="top" class="card-instance album" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;height: 158px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + album['art_hash']) if base_url_image else album['art_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #282828;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
<td class="card-poster-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;width: 152px;min-width: 152px;height: 152px;">
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank" style="text-decoration: underline;">
|
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + album['thumb_hash']) if base_url_image else album['poster_url']});border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;background-color: #3F4245;background-position: center;background-size: cover;background-repeat: no-repeat;background-clip: padding-box;border: 1px solid rgba(255,255,255,.1);">
|
||||||
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-cover.png' if base_url_image else 'https://i.imgur.com/ObC1NeY.png'}" width="150" height="150" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;display: block;">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="card-info-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;padding-left: 4px;text-align: left;height: 152px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;height: 100%;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-title nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.9rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;border-bottom: 1px solid rgba(255, 255, 255, .1);line-height: 1.2rem;padding: 5px;">
|
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank" style="text-decoration: none;color: #ffffff;">${album['title']}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-body" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.75rem;vertical-align: top;padding: 5px;height: 82px;min-height: 82px;">
|
|
||||||
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
|
||||||
<em>${album['parent_title']} · ${album['track_count']} track${'s' if album['track_count'] > 1 else ''}</em>
|
|
||||||
</p>
|
|
||||||
% if artist['title'].lower() != 'various artists':
|
|
||||||
<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;">
|
|
||||||
${album['summary'][:200] + (album['summary'][200:] and '...')}
|
|
||||||
</p>
|
|
||||||
% endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-footer nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.6rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;padding-top: 0px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="badge-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;max-width: 265px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<td style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;">
|
||||||
% if album['year']:
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank" style="text-decoration: underline;">
|
||||||
<span class="badge" title="${album['year']}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${album['year']}</span>
|
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-cover.png' if base_url_image else 'https://i.imgur.com/ObC1NeY.png'}" width="150" height="150" style="border: none;-ms-interpolation-mode: bicubic;max-width: 100%;display: block;">
|
||||||
% endif
|
</a>
|
||||||
% if album['genres']:
|
</td>
|
||||||
% for genre in album['genres'][:2]:
|
</tr>
|
||||||
<span class="badge" title="${genre}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${genre}</span>
|
</tbody>
|
||||||
% endfor
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="card-info-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;padding-left: 4px;text-align: left;height: 152px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;height: 100%;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-title nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.9rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;border-bottom: 1px solid rgba(255, 255, 255, .1);line-height: 1.2rem;padding: 5px;">
|
||||||
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank" style="text-decoration: none;color: #ffffff;">${album['title']}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-body" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.75rem;vertical-align: top;padding: 5px;height: 82px;min-height: 82px;">
|
||||||
|
<p class="nowrap mb5" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;margin-bottom: 5px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;max-width: 325px;">
|
||||||
|
<em>${album['parent_title']} · ${album['track_count']} track${'s' if album['track_count'] > 1 else ''}</em>
|
||||||
|
</p>
|
||||||
|
% if artist['title'].lower() != 'various artists':
|
||||||
|
<p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-weight: 400;margin: 0;max-width: 325px;">
|
||||||
|
${album['summary'][:200] + (album['summary'][200:] and '...')}
|
||||||
|
</p>
|
||||||
% endif
|
% endif
|
||||||
</td>
|
</td>
|
||||||
% if album['rating']:
|
</tr>
|
||||||
<% rating = int(round(float(album['rating']) / 2)) %>
|
<tr>
|
||||||
<td class="star-rating-container" title="${int(float(album['rating'])/0.1)}%" align="right" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: bottom;width: 60px;padding-right: 5px;">
|
<td class="card-info-footer nowrap" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 0.6rem;vertical-align: top;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;padding-top: 0px;padding-right: 5px;padding-bottom: 5px;padding-left: 5px;">
|
||||||
% for _ in range(rating):
|
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate;mso-table-lspace: 0pt;mso-table-rspace: 0pt;width: 100%;">
|
||||||
<span class="star-rating full" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #E5A00D;">★</span>
|
<tbody>
|
||||||
% endfor
|
<tr>
|
||||||
% for _ in range(5-rating):
|
<td class="badge-container" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: top;max-width: 265px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
<span class="star-rating empty" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #aaaaaa;">☆</span>
|
% if album['year']:
|
||||||
% endfor
|
<span class="badge" title="${album['year']}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${album['year']}</span>
|
||||||
|
% endif
|
||||||
|
% if album['genres']:
|
||||||
|
% for genre in album['genres'][:2]:
|
||||||
|
<span class="badge" title="${genre}" style="display: inline-block;min-width: 10px;padding: 3px 7px;font-size: 11px;line-height: 1;text-align: center;white-space: nowrap;vertical-align: middle;background-color: rgba(0, 0, 0, .25);border-radius: 2px;text-overflow: ellipsis;overflow: hidden;">${genre}</span>
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
</td>
|
||||||
|
% if album['rating']:
|
||||||
|
<% rating = int(round(float(album['rating']) / 2)) %>
|
||||||
|
<td class="star-rating-container" title="${int(float(album['rating'])/0.1)}%" align="right" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 14px;vertical-align: bottom;width: 60px;padding-right: 5px;">
|
||||||
|
% for _ in range(rating):
|
||||||
|
<span class="star-rating full" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #E5A00D;">★</span>
|
||||||
|
% endfor
|
||||||
|
% for _ in range(5-rating):
|
||||||
|
<span class="star-rating empty" style="font-size: 0.8rem;line-height: 1rem;width: 0.5rem;display: inline-block;color: #aaaaaa;">☆</span>
|
||||||
|
% endfor
|
||||||
|
</td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -983,14 +1025,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
% if not album_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 0 !important;width: 251px !important;min-width: 251px !important;max-width: 251px !important;"></td>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% else:
|
|
||||||
<td align="center" valign="top" class="card-instance" style="font-family: 'Open Sans', Helvetica, Arial, sans-serif;font-size: 12px;vertical-align: top;overflow: hidden;padding: 3px;width: 502px;min-width: 502px;max-width: 502px;"></td>
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -374,6 +374,12 @@
|
||||||
min-width: 502px;
|
min-width: 502px;
|
||||||
max-width: 502px;
|
max-width: 502px;
|
||||||
}
|
}
|
||||||
|
.card-instance.pad {
|
||||||
|
padding: 0 !important;
|
||||||
|
width: 251px !important;
|
||||||
|
min-width: 251px !important;
|
||||||
|
max-width: 251px !important;
|
||||||
|
}
|
||||||
.card-instance.movie,
|
.card-instance.movie,
|
||||||
.card-instance.show {
|
.card-instance.show {
|
||||||
height: 233px;
|
height: 233px;
|
||||||
|
@ -382,6 +388,7 @@
|
||||||
height: 158px;
|
height: 158px;
|
||||||
}
|
}
|
||||||
.card-background {
|
.card-background {
|
||||||
|
background-color: #282828;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
@ -653,75 +660,86 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
% for movie_a, movie_b in grouper(recently_added['movie'], 2):
|
% for movie_a, movie_b in grouper(recently_added['movie'], 2):
|
||||||
<tr>
|
<tr>
|
||||||
% for movie in (movie_a, movie_b):
|
<td>
|
||||||
% if movie:
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<td align="center" valign="top" class="card-instance movie">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + movie['art_hash']) if base_url_image else movie['art_url']});">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="card-poster-container">
|
% for movie in (movie_a, movie_b):
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + movie['thumb_hash']) if base_url_image else movie['poster_url']})">
|
% if movie:
|
||||||
|
% if not movie_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad"></td>
|
||||||
|
% endif
|
||||||
|
<td align="center" valign="top" class="card-instance movie">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + movie['art_hash']) if base_url_image else movie['art_url']});">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="card-poster-container">
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank">
|
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + movie['thumb_hash']) if base_url_image else movie['poster_url']})">
|
||||||
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="card-info-container">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-title nowrap">
|
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank">${movie['title']}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-body">
|
|
||||||
% if movie['tagline']:
|
|
||||||
<p class="nowrap mb5">
|
|
||||||
<em>${movie['tagline']}</em>
|
|
||||||
</p>
|
|
||||||
% endif
|
|
||||||
<p>
|
|
||||||
${movie['summary'][:450] + (movie['summary'][450:] and '...')}
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-footer nowrap">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="badge-container">
|
<td>
|
||||||
% if movie['year']:
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank">
|
||||||
<span class="badge" title="${movie['year']}">${movie['year']}</span>
|
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225">
|
||||||
% endif
|
</a>
|
||||||
% if movie['duration']:
|
|
||||||
<% duration = int(int(movie['duration'])/60000) %>
|
|
||||||
<span class="badge" title="${duration} mins">${duration} mins</span>
|
|
||||||
% endif
|
|
||||||
% if movie['genres']:
|
|
||||||
% for genre in movie['genres'][:2]:
|
|
||||||
<span class="badge" title="${genre}">${genre}</span>
|
|
||||||
% endfor
|
|
||||||
% endif
|
|
||||||
</td>
|
</td>
|
||||||
% if movie['rating']:
|
</tr>
|
||||||
<% rating = int(round(float(movie['rating']) / 2)) %>
|
</tbody>
|
||||||
<td class="star-rating-container" title="${int(float(movie['rating'])/0.1)}%" align="right">
|
</table>
|
||||||
% for _ in range(rating):
|
</td>
|
||||||
<span class="star-rating full">★</span>
|
<td class="card-info-container">
|
||||||
% endfor
|
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table">
|
||||||
% for _ in range(5-rating):
|
<tbody>
|
||||||
<span class="star-rating empty">☆</span>
|
<tr>
|
||||||
% endfor
|
<td class="card-info-title nowrap">
|
||||||
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${movie['rating_key']}" title="${movie['title']}" target="_blank">${movie['title']}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-body">
|
||||||
|
% if movie['tagline']:
|
||||||
|
<p class="nowrap mb5">
|
||||||
|
<em>${movie['tagline']}</em>
|
||||||
|
</p>
|
||||||
|
% endif
|
||||||
|
<p>
|
||||||
|
${movie['summary'][:450] + (movie['summary'][450:] and '...')}
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-footer nowrap">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="badge-container">
|
||||||
|
% if movie['year']:
|
||||||
|
<span class="badge" title="${movie['year']}">${movie['year']}</span>
|
||||||
|
% endif
|
||||||
|
% if movie['duration']:
|
||||||
|
<% duration = int(int(movie['duration'])/60000) %>
|
||||||
|
<span class="badge" title="${duration} mins">${duration} mins</span>
|
||||||
|
% endif
|
||||||
|
% if movie['genres']:
|
||||||
|
% for genre in movie['genres'][:2]:
|
||||||
|
<span class="badge" title="${genre}">${genre}</span>
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
</td>
|
||||||
|
% if movie['rating']:
|
||||||
|
<% rating = int(round(float(movie['rating']) / 2)) %>
|
||||||
|
<td class="star-rating-container" title="${int(float(movie['rating'])/0.1)}%" align="right">
|
||||||
|
% for _ in range(rating):
|
||||||
|
<span class="star-rating full">★</span>
|
||||||
|
% endfor
|
||||||
|
% for _ in range(5-rating):
|
||||||
|
<span class="star-rating empty">☆</span>
|
||||||
|
% endfor
|
||||||
|
</td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -730,14 +748,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
% if not movie_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad"></td>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% else:
|
|
||||||
<td align="center" valign="top" class="card-instance"></td>
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -765,108 +784,119 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
% for show_a, show_b in grouper(recently_added['show'], 2):
|
% for show_a, show_b in grouper(recently_added['show'], 2):
|
||||||
<tr>
|
<tr>
|
||||||
% for show in (show_a, show_b):
|
<td>
|
||||||
% if show:
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<%
|
|
||||||
if show['season_count'] == 1:
|
|
||||||
if show['season'][0]['episode_count'] == 1:
|
|
||||||
link_rating_key = show['season'][0]['episode'][0]['rating_key']
|
|
||||||
else:
|
|
||||||
link_rating_key = show['season'][0]['episode'][0]['parent_rating_key']
|
|
||||||
else:
|
|
||||||
link_rating_key = show['rating_key']
|
|
||||||
%>
|
|
||||||
<td align="center" valign="top" class="card-instance show">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + show['art_hash']) if base_url_image else show['art_url']});">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="card-poster-container">
|
% for show in (show_a, show_b):
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + show['thumb_hash']) if base_url_image else show['poster_url']})">
|
% if show:
|
||||||
|
% if not show_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad"></td>
|
||||||
|
% endif
|
||||||
|
<%
|
||||||
|
if show['season_count'] == 1:
|
||||||
|
if show['season'][0]['episode_count'] == 1:
|
||||||
|
link_rating_key = show['season'][0]['episode'][0]['rating_key']
|
||||||
|
else:
|
||||||
|
link_rating_key = show['season'][0]['episode'][0]['parent_rating_key']
|
||||||
|
else:
|
||||||
|
link_rating_key = show['rating_key']
|
||||||
|
%>
|
||||||
|
<td align="center" valign="top" class="card-instance show">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + show['art_hash']) if base_url_image else show['art_url']});">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="card-poster-container">
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank">
|
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + show['thumb_hash']) if base_url_image else show['poster_url']})">
|
||||||
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="card-info-container">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-title nowrap">
|
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank">${show['title']}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-body">
|
|
||||||
<p class="nowrap mb5">
|
|
||||||
% if show['season_count'] > 1:
|
|
||||||
<em>${show['season_count']} seasons /</em>
|
|
||||||
% endif
|
|
||||||
<% total_show_episodes = sum(s['episode_count'] for s in show['season']) %>
|
|
||||||
<em>${total_show_episodes} episode${'s' if total_show_episodes > 1 else ''}</em>
|
|
||||||
</p>
|
|
||||||
<p class="nowrap mb5">
|
|
||||||
% for i, season in enumerate(show['season'][:8]):
|
|
||||||
Season ${season['media_index']} ·
|
|
||||||
% if season['episode_count'] == 1:
|
|
||||||
Episode ${season['episode'][0]['media_index']} - ${season['episode'][0]['title']}
|
|
||||||
% else:
|
|
||||||
Episodes ${season['episode_range']}
|
|
||||||
% endif
|
|
||||||
% if i < min(show['season_count'], 7):
|
|
||||||
<br>
|
|
||||||
% elif i == 7 and show['season_count'] > 8:
|
|
||||||
...plus ${show['season_count'] - 8} more seasons!
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
% if show['season_count'] == 1 and show['season'][0]['episode_count'] == 1:
|
|
||||||
${show['season'][0]['episode'][0]['summary'][:350] + (show['season'][0]['episode'][0]['summary'][350:] and '...')}
|
|
||||||
% else:
|
|
||||||
<% length = max(0, 350 - 50 * (show['season_count'] - 1)) %>
|
|
||||||
% if length:
|
|
||||||
${show['summary'][:length] + (show['summary'][length:] and '...')}
|
|
||||||
% endif
|
|
||||||
% endif
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-footer nowrap">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="badge-container">
|
<td>
|
||||||
% if show['year']:
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank">
|
||||||
<span class="badge" title="${show['year']}">${show['year']}</span>
|
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-poster.png' if base_url_image else 'https://i.imgur.com/AeyPvJ4.png'}" width="150" height="225">
|
||||||
% endif
|
</a>
|
||||||
% if show['duration']:
|
|
||||||
<% duration = int(int(show['duration'])/60000) %>
|
|
||||||
<span class="badge" title="${duration} mins">${duration} mins</span>
|
|
||||||
% endif
|
|
||||||
% if show['genres']:
|
|
||||||
% for genre in show['genres'][:2]:
|
|
||||||
<span class="badge" title="${genre}">${genre}</span>
|
|
||||||
% endfor
|
|
||||||
% endif
|
|
||||||
</td>
|
</td>
|
||||||
% if show['rating']:
|
</tr>
|
||||||
<% rating = int(round(float(show['rating']) / 2)) %>
|
</tbody>
|
||||||
<td class="star-rating-container" title="${int(float(show['rating'])/0.1)}%" align="right">
|
</table>
|
||||||
% for _ in range(rating):
|
</td>
|
||||||
<span class="star-rating full">★</span>
|
<td class="card-info-container">
|
||||||
% endfor
|
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table">
|
||||||
% for _ in range(5-rating):
|
<tbody>
|
||||||
<span class="star-rating empty">☆</span>
|
<tr>
|
||||||
% endfor
|
<td class="card-info-title nowrap">
|
||||||
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${link_rating_key}" title="${show['title']}" target="_blank">${show['title']}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-body">
|
||||||
|
<p class="nowrap mb5">
|
||||||
|
% if show['season_count'] > 1:
|
||||||
|
<em>${show['season_count']} seasons /</em>
|
||||||
|
% endif
|
||||||
|
<% total_show_episodes = sum(s['episode_count'] for s in show['season']) %>
|
||||||
|
<em>${total_show_episodes} episode${'s' if total_show_episodes > 1 else ''}</em>
|
||||||
|
</p>
|
||||||
|
<p class="nowrap mb5">
|
||||||
|
% for i, season in enumerate(show['season'][:8]):
|
||||||
|
Season ${season['media_index']} ·
|
||||||
|
% if season['episode_count'] == 1:
|
||||||
|
Episode ${season['episode'][0]['media_index']} - ${season['episode'][0]['title']}
|
||||||
|
% else:
|
||||||
|
Episodes ${season['episode_range']}
|
||||||
|
% endif
|
||||||
|
% if i < min(show['season_count'], 7):
|
||||||
|
<br>
|
||||||
|
% elif i == 7 and show['season_count'] > 8:
|
||||||
|
...plus ${show['season_count'] - 8} more seasons!
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
% if show['season_count'] == 1 and show['season'][0]['episode_count'] == 1:
|
||||||
|
${show['season'][0]['episode'][0]['summary'][:350] + (show['season'][0]['episode'][0]['summary'][350:] and '...')}
|
||||||
|
% else:
|
||||||
|
<% length = max(0, 350 - 50 * (show['season_count'] - 1)) %>
|
||||||
|
% if length:
|
||||||
|
${show['summary'][:length] + (show['summary'][length:] and '...')}
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-footer nowrap">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="badge-container">
|
||||||
|
% if show['year']:
|
||||||
|
<span class="badge" title="${show['year']}">${show['year']}</span>
|
||||||
|
% endif
|
||||||
|
% if show['duration']:
|
||||||
|
<% duration = int(int(show['duration'])/60000) %>
|
||||||
|
<span class="badge" title="${duration} mins">${duration} mins</span>
|
||||||
|
% endif
|
||||||
|
% if show['genres']:
|
||||||
|
% for genre in show['genres'][:2]:
|
||||||
|
<span class="badge" title="${genre}">${genre}</span>
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
</td>
|
||||||
|
% if show['rating']:
|
||||||
|
<% rating = int(round(float(show['rating']) / 2)) %>
|
||||||
|
<td class="star-rating-container" title="${int(float(show['rating'])/0.1)}%" align="right">
|
||||||
|
% for _ in range(rating):
|
||||||
|
<span class="star-rating full">★</span>
|
||||||
|
% endfor
|
||||||
|
% for _ in range(5-rating):
|
||||||
|
<span class="star-rating empty">☆</span>
|
||||||
|
% endfor
|
||||||
|
</td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -875,14 +905,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
% if not show_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad"></td>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% else:
|
|
||||||
<td align="center" valign="top" class="card-instance"></td>
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -910,71 +941,82 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
% for album_a, album_b in grouper([a for artist in recently_added['artist'] for a in artist['album']], 2):
|
% for album_a, album_b in grouper([a for artist in recently_added['artist'] for a in artist['album']], 2):
|
||||||
<tr>
|
<tr>
|
||||||
% for album in (album_a, album_b):
|
<td>
|
||||||
% if album:
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<td align="center" valign="top" class="card-instance album">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + album['art_hash']) if base_url_image else album['art_url']});">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="card-poster-container">
|
% for album in (album_a, album_b):
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + album['thumb_hash']) if base_url_image else album['poster_url']})">
|
% if album:
|
||||||
|
% if not album_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad"></td>
|
||||||
|
% endif
|
||||||
|
<td align="center" valign="top" class="card-instance album">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="3" width="100%" class="card-background" style="background-image: url(${(base_url_image + album['art_hash']) if base_url_image else album['art_url']});">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="card-poster-container">
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank">
|
<table border="0" cellpadding="0" cellspacing="0" class="card-poster" style="background-image: url(${(base_url_image + album['thumb_hash']) if base_url_image else album['poster_url']})">
|
||||||
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-cover.png' if base_url_image else 'https://i.imgur.com/ObC1NeY.png'}" width="150" height="150">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td class="card-info-container">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-title nowrap">
|
|
||||||
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank">${album['title']}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-body">
|
|
||||||
<p class="nowrap mb5">
|
|
||||||
<em>${album['parent_title']} · ${album['track_count']} track${'s' if album['track_count'] > 1 else ''}</em>
|
|
||||||
</p>
|
|
||||||
% if artist['title'].lower() != 'various artists':
|
|
||||||
<p>
|
|
||||||
${album['summary'][:200] + (album['summary'][200:] and '...')}
|
|
||||||
</p>
|
|
||||||
% endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="card-info-footer nowrap">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="badge-container">
|
<td>
|
||||||
% if album['year']:
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank">
|
||||||
<span class="badge" title="${album['year']}">${album['year']}</span>
|
<img class="card-poster-overlay" src="${base_url_image + 'images/newsletter/view-on-plex-cover.png' if base_url_image else 'https://i.imgur.com/ObC1NeY.png'}" width="150" height="150">
|
||||||
% endif
|
</a>
|
||||||
% if album['genres']:
|
</td>
|
||||||
% for genre in album['genres'][:2]:
|
</tr>
|
||||||
<span class="badge" title="${genre}">${genre}</span>
|
</tbody>
|
||||||
% endfor
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="card-info-container">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" class="card-info-container-table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-title nowrap">
|
||||||
|
<a href="${parameters['pms_web_url']}#!/server/${parameters['pms_identifier']}/details?key=%2Flibrary%2Fmetadata%2F${album['rating_key']}" title="${album['title']}" target="_blank">${album['title']}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="card-info-body">
|
||||||
|
<p class="nowrap mb5">
|
||||||
|
<em>${album['parent_title']} · ${album['track_count']} track${'s' if album['track_count'] > 1 else ''}</em>
|
||||||
|
</p>
|
||||||
|
% if artist['title'].lower() != 'various artists':
|
||||||
|
<p>
|
||||||
|
${album['summary'][:200] + (album['summary'][200:] and '...')}
|
||||||
|
</p>
|
||||||
% endif
|
% endif
|
||||||
</td>
|
</td>
|
||||||
% if album['rating']:
|
</tr>
|
||||||
<% rating = int(round(float(album['rating']) / 2)) %>
|
<tr>
|
||||||
<td class="star-rating-container" title="${int(float(album['rating'])/0.1)}%" align="right">
|
<td class="card-info-footer nowrap">
|
||||||
% for _ in range(rating):
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
<span class="star-rating full">★</span>
|
<tbody>
|
||||||
% endfor
|
<tr>
|
||||||
% for _ in range(5-rating):
|
<td class="badge-container">
|
||||||
<span class="star-rating empty">☆</span>
|
% if album['year']:
|
||||||
% endfor
|
<span class="badge" title="${album['year']}">${album['year']}</span>
|
||||||
|
% endif
|
||||||
|
% if album['genres']:
|
||||||
|
% for genre in album['genres'][:2]:
|
||||||
|
<span class="badge" title="${genre}">${genre}</span>
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
</td>
|
||||||
|
% if album['rating']:
|
||||||
|
<% rating = int(round(float(album['rating']) / 2)) %>
|
||||||
|
<td class="star-rating-container" title="${int(float(album['rating'])/0.1)}%" align="right">
|
||||||
|
% for _ in range(rating):
|
||||||
|
<span class="star-rating full">★</span>
|
||||||
|
% endfor
|
||||||
|
% for _ in range(5-rating):
|
||||||
|
<span class="star-rating empty">☆</span>
|
||||||
|
% endfor
|
||||||
|
</td>
|
||||||
|
% endif
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% endif
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -983,14 +1025,15 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
% if not album_b:
|
||||||
|
<td align="center" valign="top" class="card-instance pad"></td>
|
||||||
|
% endif
|
||||||
|
% endif
|
||||||
|
% endfor
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
% else:
|
|
||||||
<td align="center" valign="top" class="card-instance"></td>
|
|
||||||
% endif
|
|
||||||
% endfor
|
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -698,9 +698,12 @@ class RecentlyAdded(Newsletter):
|
||||||
item['thumb_hash'] = set_hash_image_info(
|
item['thumb_hash'] = set_hash_image_info(
|
||||||
img=item['thumb'], width=150, height=225, fallback='poster')
|
img=item['thumb'], width=150, height=225, fallback='poster')
|
||||||
|
|
||||||
item['art_hash'] = set_hash_image_info(
|
if item['art']:
|
||||||
img=item['art'], width=500, height=280,
|
item['art_hash'] = set_hash_image_info(
|
||||||
opacity=25, background='282828', blur=3, fallback='art')
|
img=item['art'], width=500, height=280,
|
||||||
|
opacity=25, background='282828', blur=3, fallback='art')
|
||||||
|
else:
|
||||||
|
item['art_hash'] = ''
|
||||||
|
|
||||||
item['poster_url'] = ''
|
item['poster_url'] = ''
|
||||||
item['art_url'] = ''
|
item['art_url'] = ''
|
||||||
|
|
|
@ -1119,6 +1119,9 @@ def get_imgur_info(img=None, rating_key=None, title='', width=600, height=1000,
|
||||||
|
|
||||||
def set_hash_image_info(img=None, rating_key=None, width=600, height=1000,
|
def set_hash_image_info(img=None, rating_key=None, width=600, height=1000,
|
||||||
opacity=100, background='000000', blur=0, fallback=None):
|
opacity=100, background='000000', blur=0, fallback=None):
|
||||||
|
if not rating_key and not img:
|
||||||
|
return fallback
|
||||||
|
|
||||||
if rating_key and not img:
|
if rating_key and not img:
|
||||||
if fallback == 'art':
|
if fallback == 'art':
|
||||||
img = '/library/metadata/{}/art'.format(rating_key)
|
img = '/library/metadata/{}/art'.format(rating_key)
|
||||||
|
|
|
@ -4021,6 +4021,18 @@ class WebInterface(object):
|
||||||
def image(self, *args, **kwargs):
|
def image(self, *args, **kwargs):
|
||||||
if args:
|
if args:
|
||||||
img_hash = args[0]
|
img_hash = args[0]
|
||||||
|
|
||||||
|
if img_hash in ('poster', 'cover', 'art'):
|
||||||
|
if img_hash == 'poster':
|
||||||
|
fbi = common.DEFAULT_POSTER_THUMB
|
||||||
|
elif img_hash == 'cover':
|
||||||
|
fbi = common.DEFAULT_COVER_THUMB
|
||||||
|
elif img_hash == 'art':
|
||||||
|
fbi = common.DEFAULT_ART
|
||||||
|
|
||||||
|
fp = os.path.join(plexpy.PROG_DIR, 'data', fbi)
|
||||||
|
return serve_file(path=fp, content_type='image/png')
|
||||||
|
|
||||||
img_info = notification_handler.get_hash_image_info(img_hash=img_hash)
|
img_info = notification_handler.get_hash_image_info(img_hash=img_hash)
|
||||||
|
|
||||||
if img_info:
|
if img_info:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue