mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Update pms_image_proxy for playlist images
This commit is contained in:
parent
358d44f1af
commit
18dd4951f7
1 changed files with 8 additions and 3 deletions
|
@ -4658,11 +4658,15 @@ class WebInterface(object):
|
||||||
else:
|
else:
|
||||||
img = '/library/metadata/{}/thumb'.format(rating_key)
|
img = '/library/metadata/{}/thumb'.format(rating_key)
|
||||||
|
|
||||||
if img.startswith('/library/metadata'):
|
if img:
|
||||||
parts = 6 if 'composite' in img else 5
|
parts = 5
|
||||||
|
if img.startswith('/playlists'):
|
||||||
|
parts -= 1
|
||||||
|
rating_key_idx = parts - 2
|
||||||
|
parts += int('composite' in img)
|
||||||
img_split = img.split('/')
|
img_split = img.split('/')
|
||||||
img = '/'.join(img_split[:parts])
|
img = '/'.join(img_split[:parts])
|
||||||
img_rating_key = img_split[3]
|
img_rating_key = img_split[rating_key_idx]
|
||||||
if rating_key != img_rating_key:
|
if rating_key != img_rating_key:
|
||||||
rating_key = img_rating_key
|
rating_key = img_rating_key
|
||||||
|
|
||||||
|
@ -4693,6 +4697,7 @@ class WebInterface(object):
|
||||||
# the image does not exist, download it from pms
|
# the image does not exist, download it from pms
|
||||||
try:
|
try:
|
||||||
pms_connect = pmsconnect.PmsConnect()
|
pms_connect = pmsconnect.PmsConnect()
|
||||||
|
pms_connect.request_handler._silent = True
|
||||||
result = pms_connect.get_image(img=img,
|
result = pms_connect.get_image(img=img,
|
||||||
width=width,
|
width=width,
|
||||||
height=height,
|
height=height,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue