small fix for photo support

This commit is contained in:
marcelveldt 2016-01-13 13:24:26 +01:00
parent 10606f733d
commit 0bc17ec277

View file

@ -480,7 +480,7 @@ def createListItemFromEmbyItem(item):
allart = art.getAllArtwork(item) allart = art.getAllArtwork(item)
if item["Type"] is "Photo": if item["Type"] == "Photo":
#listitem setup for pictures... #listitem setup for pictures...
img_path = allart.get('Primary') img_path = allart.get('Primary')
li.setProperty("path",img_path) li.setProperty("path",img_path)
@ -489,8 +489,9 @@ def createListItemFromEmbyItem(item):
picture = picture[0] picture = picture[0]
if picture.get("Width") > picture.get("Height"): if picture.get("Width") > picture.get("Height"):
li.setArt( {"fanart": img_path}) #add image as fanart for use with skinhelper auto thumb/backgrund creation li.setArt( {"fanart": img_path}) #add image as fanart for use with skinhelper auto thumb/backgrund creation
li.setInfo('pictures', infoLabels={ "picturepath": img_path, "date": premieredate, "size": picture.get("Size"), "exif:width": str(picture.get("Width")), "exif:height": str(picture.get("Height")), "title": "blaat" }) li.setInfo('pictures', infoLabels={ "picturepath": img_path, "date": premieredate, "size": picture.get("Size"), "exif:width": str(picture.get("Width")), "exif:height": str(picture.get("Height")), "title": title})
li.setThumbnailImage(img_path) li.setThumbnailImage(img_path)
li.setProperty("plot",API.getOverview())
li.setIconImage('DefaultPicture.png') li.setIconImage('DefaultPicture.png')
else: else:
#normal video items #normal video items
@ -508,10 +509,6 @@ def createListItemFromEmbyItem(item):
played = userdata['Played'] played = userdata['Played']
if played: overlay = 7 if played: overlay = 7
else: overlay = 6 else: overlay = 6
favorite = userdata['Favorite']
if favorite: overlay = 5
playcount = userdata['PlayCount'] playcount = userdata['PlayCount']
if playcount is None: if playcount is None:
playcount = 0 playcount = 0