Improve refreshing of cached Plex images

This commit is contained in:
JonnyWong16 2018-05-03 20:29:23 -07:00
commit ed4722c4ce
2 changed files with 18 additions and 7 deletions

View file

@ -2436,7 +2436,7 @@ class PmsConnect(object):
return labels_list
def get_image(self, img=None, width=1000, height=1500, opacity=None, background=None, blur=None,
img_format='png', clip=False, **kwargs):
img_format='png', clip=False, refresh=False, **kwargs):
"""
Return image data as array.
Array contains the image content type and image binary
@ -2454,6 +2454,9 @@ class PmsConnect(object):
height = height or 1500
if img:
if refresh:
img = '{}/{}'.format(img.rstrip('/'), int(time.time()))
if clip:
params = {'url': '%s&%s' % (img, urllib.urlencode({'X-Plex-Token': self.token}))}
else: