Make sure clip image urls are escaped
This commit is contained in:
@@ -61,6 +61,8 @@ DOCUMENTATION :: END
|
|||||||
|
|
||||||
% if data is not None:
|
% if data is not None:
|
||||||
<%
|
<%
|
||||||
|
from urllib import quote
|
||||||
|
|
||||||
from plexpy import helpers
|
from plexpy import helpers
|
||||||
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
data['indexes'] = helpers.cast_to_int(data['indexes'])
|
||||||
%>
|
%>
|
||||||
@@ -90,9 +92,11 @@ DOCUMENTATION :: END
|
|||||||
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
<div class="dashboard-activity-poster-face" style="background-image: url(${data['thumb']});"></div>
|
||||||
% else:
|
% else:
|
||||||
% if data['art']:
|
% if data['art']:
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['art']}&width=500&height=280&fallback=art);"></div>
|
<!--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:
|
% else:
|
||||||
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=art);"></div>
|
<!--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
|
||||||
% endif
|
% endif
|
||||||
% elif data['media_type'] == 'photo':
|
% elif data['media_type'] == 'photo':
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import urllib2
|
import urllib
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
|
||||||
import plexpy
|
import plexpy
|
||||||
@@ -387,7 +387,7 @@ class PmsConnect(object):
|
|||||||
|
|
||||||
Output: array
|
Output: array
|
||||||
"""
|
"""
|
||||||
uri = '/search?query=' + urllib2.quote(query.encode('utf8')) + track
|
uri = '/search?query=' + urllib.quote(query.encode('utf8')) + track
|
||||||
request = self.request_handler.make_request(uri=uri,
|
request = self.request_handler.make_request(uri=uri,
|
||||||
proto=self.protocol,
|
proto=self.protocol,
|
||||||
request_type='GET',
|
request_type='GET',
|
||||||
@@ -1902,10 +1902,12 @@ class PmsConnect(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if img:
|
if img:
|
||||||
uri = '/photo/:/transcode?url=http://127.0.0.1:32400%s' % img
|
params = {'url': plexpy.CONFIG.PMS_URL + img}
|
||||||
if width.isdigit() and height.isdigit():
|
if width.isdigit() and height.isdigit():
|
||||||
uri += '&width=%s&height=%s' % (width, height)
|
params['width'] = width
|
||||||
|
params['height'] = height
|
||||||
|
|
||||||
|
uri = '/photo/:/transcode?%s' % urllib.urlencode(params)
|
||||||
result = self.request_handler.make_request(uri=uri,
|
result = self.request_handler.make_request(uri=uri,
|
||||||
proto=self.protocol,
|
proto=self.protocol,
|
||||||
request_type='GET',
|
request_type='GET',
|
||||||
|
Reference in New Issue
Block a user