Update pms_image_proxy with helper function and encode URL params

This commit is contained in:
JonnyWong16 2020-02-19 19:57:56 -08:00
commit d752d46676
14 changed files with 136 additions and 64 deletions

View file

@ -29,6 +29,7 @@ DOCUMENTATION :: END
% if data != None:
<%
from plexpy.common import MEDIA_TYPE_HEADERS
from plexpy.helpers import pms_image_proxy
types = ('movie', 'show', 'artist', 'album')
%>
% for media_type in types:
@ -48,9 +49,9 @@ DOCUMENTATION :: END
<a href="info?rating_key=${child['rating_key']}" title="${child['title']}">
<div class="item-children-poster">
% if media_type in ('artist', 'album'):
<div class="item-children-poster-face cover-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&rating_key=${child['rating_key']}&width=300&height=300&fallback=cover);"></div>
<div class="item-children-poster-face cover-item" style="background-image: url(${pms_image_proxy(child['thumb'], child['rating_key'], 300, 300, fallback='cover')});"></div>
% else:
<div class="item-children-poster-face poster-item" style="background-image: url(pms_image_proxy?img=${child['thumb']}&rating_key=${child['rating_key']}&width=300&height=450&fallback=poster);"></div>
<div class="item-children-poster-face poster-item" style="background-image: url(${pms_image_proxy(child['thumb'], child['rating_key'], 300, 450, fallback='poster')});"></div>
% endif
% if _session['user_group'] == 'admin':
<span class="overlay-refresh-image" title="Refresh image"><i class="fa fa-refresh refresh_pms_image"></i></span>