Request pictures with transcoding API

- Hopefully fixes #189
This commit is contained in:
tomkat83 2017-07-01 13:08:40 +02:00
parent ec140d162a
commit 4352e06ecc

View file

@ -1806,15 +1806,14 @@ class API():
} }
def __getOneArtwork(self, entry): def __getOneArtwork(self, entry):
try: if entry not in self.item.attrib:
artwork = self.item.attrib[entry] return ''
if artwork.startswith('http'): artwork = self.item.attrib[entry]
pass if artwork.startswith('http'):
else: pass
artwork = "%s%s" % (self.server, artwork) else:
artwork = self.addPlexCredentialsToUrl(artwork) artwork = self.addPlexCredentialsToUrl(
except KeyError: "%s/photo/:/transcode?width=4000&height=4000&minSize=1&upscale=0&url=%s" % (self.server, artwork))
artwork = ""
return artwork return artwork
def getAllArtwork(self, parentInfo=False): def getAllArtwork(self, parentInfo=False):