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
|
# Process backdrops
|
||||||
if not allartworks['Backdrop']:
|
if not allartworks['Backdrop']:
|
||||||
|
|
||||||
parentId = item.get('ParentBackdropItemId')
|
parentId = item.get('ParentBackdropItemId')
|
||||||
if parentId:
|
if parentId:
|
||||||
# If there is a parentId, go through the parent backdrop list
|
# If there is a parentId, go through the parent backdrop list
|
||||||
|
@ -444,12 +445,25 @@ class API():
|
||||||
for parentart in parentartwork:
|
for parentart in parentartwork:
|
||||||
|
|
||||||
if not allartworks[parentart]:
|
if not allartworks[parentart]:
|
||||||
|
|
||||||
parentId = item.get('Parent%sItemId' % parentart)
|
parentId = item.get('Parent%sItemId' % parentart)
|
||||||
if parentId:
|
if parentId:
|
||||||
|
|
||||||
parentTag = item['Parent%sImageTag' % parentart]
|
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)
|
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
|
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
|
return allartworks
|
||||||
|
|
||||||
def getArtwork(self, data, type, mediaType = "", index = "0", userParentInfo = False):
|
def getArtwork(self, data, type, mediaType = "", index = "0", userParentInfo = False):
|
||||||
|
|
Loading…
Reference in a new issue