mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 01:36:11 +00:00
Add parent album to artwork
For parent images
This commit is contained in:
parent
d8ae0b695c
commit
e781e9e02d
1 changed files with 14 additions and 0 deletions
|
@ -428,6 +428,7 @@ class API():
|
|||
|
||||
# Process backdrops
|
||||
if not allartworks['Backdrop']:
|
||||
|
||||
parentId = item.get('ParentBackdropItemId')
|
||||
if parentId:
|
||||
# If there is a parentId, go through the parent backdrop list
|
||||
|
@ -444,12 +445,25 @@ class API():
|
|||
for parentart in parentartwork:
|
||||
|
||||
if not allartworks[parentart]:
|
||||
|
||||
parentId = item.get('Parent%sItemId' % parentart)
|
||||
if parentId:
|
||||
|
||||
parentTag = item['Parent%sImageTag' % parentart]
|
||||
artwork = "%s/mediabrowser/Items/%s/Images/%s/0?MaxWidth=%s&MaxHeight=%s&Format=original&Tag=%s%s" % (server, parentId, parentart, maxWidth, maxHeight, parentTag, quality)
|
||||
allartworks[parentart] = artwork
|
||||
|
||||
# Parent album works a bit differently
|
||||
if not allartworks['Primary']:
|
||||
|
||||
parentId = item.get('AlbumId')
|
||||
if parentId and item.get('AlbumPrimaryImageTag'):
|
||||
|
||||
parentTag = item['AlbumPrimaryImageTag']
|
||||
artwork = "%s/mediabrowser/Items/%s/Images/Primary/0?MaxWidth=%s&MaxHeight=%s&Format=original&Tag=%s%s" % (server, parentId, maxWidth, maxHeight, parentTag, quality)
|
||||
allartworks['Primary'] = artwork
|
||||
|
||||
|
||||
return allartworks
|
||||
|
||||
def getArtwork(self, data, type, mediaType = "", index = "0", userParentInfo = False):
|
||||
|
|
Loading…
Reference in a new issue