mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Merge pull request #856 from Hellowlol/imgfix
fix for image proxy for api.
This commit is contained in:
commit
58f72d2d9c
1 changed files with 15 additions and 7 deletions
|
@ -3283,8 +3283,20 @@ class WebInterface(object):
|
|||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
@addtoapi()
|
||||
def pms_image_proxy(self, img='', rating_key=None, width='0', height='0',
|
||||
def pms_image_proxy(self, **kwargs):
|
||||
""" See real_pms_image_proxy docs string"""
|
||||
|
||||
refresh = False
|
||||
if kwargs.get('refresh'):
|
||||
mo = member_of('admin')
|
||||
refresh = True if mo() else False
|
||||
|
||||
kwargs['refresh'] = refresh
|
||||
|
||||
return self.real_pms_image_proxy(**kwargs)
|
||||
|
||||
@addtoapi('pms_image_proxy')
|
||||
def real_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.
|
||||
|
||||
|
@ -3308,10 +3320,6 @@ class WebInterface(object):
|
|||
logger.error('No image input received.')
|
||||
return
|
||||
|
||||
if refresh:
|
||||
mo = member_of('admin')
|
||||
refresh = True if mo() else False
|
||||
|
||||
if rating_key and not img:
|
||||
img = '/library/metadata/%s/thumb/1337' % rating_key
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue