mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
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:
parent
38e04bd42a
commit
552a428985
1 changed files with 16 additions and 13 deletions
|
@ -3200,7 +3200,9 @@ class WebInterface(object):
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
@requireAuth()
|
@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. """
|
""" Gets an image from the PMS and saves it to the image cache directory. """
|
||||||
|
|
||||||
if not img and not rating_key:
|
if not img and not rating_key:
|
||||||
|
@ -3221,8 +3223,9 @@ class WebInterface(object):
|
||||||
os.mkdir(c_dir)
|
os.mkdir(c_dir)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if 'indexes' in img:
|
if not plexpy.CONFIG.CACHE_IMAGES or refresh or 'indexes' in img:
|
||||||
raise NotFound
|
raise NotFound
|
||||||
|
|
||||||
return serve_file(path=ffp, content_type='image/jpeg')
|
return serve_file(path=ffp, content_type='image/jpeg')
|
||||||
|
|
||||||
except NotFound:
|
except NotFound:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue