allow refresh of images

Allow refresh of images and fix bug where a disabled cache still would
use the cache
This commit is contained in:
Hellowlol 2016-06-02 17:27:23 +02:00
parent 38e04bd42a
commit 552a428985

View file

@ -3200,7 +3200,9 @@ class WebInterface(object):
@cherrypy.expose
@requireAuth()
def pms_image_proxy(self, img='', rating_key=None, width='0', height='0', fallback=None, **kwargs):
def pms_image_proxy(self, img='', rating_key=None, width='0', height='0',
fallback=None, refresh=False, **kwargs):
""" Gets an image from the PMS and saves it to the image cache directory. """
if not img and not rating_key:
@ -3221,8 +3223,9 @@ class WebInterface(object):
os.mkdir(c_dir)
try:
if 'indexes' in img:
if not plexpy.CONFIG.CACHE_IMAGES or refresh or 'indexes' in img:
raise NotFound
return serve_file(path=ffp, content_type='image/jpeg')
except NotFound: