Tweak code for episode artwork
This commit is contained in:
parent
303adbf02e
commit
206c2a319b
2 changed files with 11 additions and 10 deletions
|
@ -760,13 +760,17 @@ class API(object):
|
|||
|
||||
# Grab artwork from Plex
|
||||
artworks = {}
|
||||
if self.plex_type() == v.PLEX_TYPE_EPISODE:
|
||||
# Episodes is a bit special, only get the thumb
|
||||
art = self._one_artwork('thumb')
|
||||
if art:
|
||||
artworks['thumb'] = art
|
||||
return artworks
|
||||
for kodi_artwork, plex_artwork in v.KODI_TO_PLEX_ARTWORK.iteritems():
|
||||
art = self._one_artwork(plex_artwork)
|
||||
if art:
|
||||
artworks[kodi_artwork] = art
|
||||
if self.plex_type() in (v.PLEX_TYPE_EPISODE,
|
||||
v.PLEX_TYPE_SONG,
|
||||
v.PLEX_TYPE_ALBUM):
|
||||
if self.plex_type() in (v.PLEX_TYPE_SONG, v.PLEX_TYPE_ALBUM):
|
||||
# Get parent item artwork if the main item is missing artwork
|
||||
if 'fanart' not in artworks:
|
||||
art = self._one_artwork('parentArt')
|
||||
|
|
|
@ -991,13 +991,10 @@ class TVShows(Items):
|
|||
self.kodi_db.modify_people(episodeid,
|
||||
v.KODI_TYPE_EPISODE,
|
||||
api.people_list())
|
||||
# Wide "screenshot" of particular episode
|
||||
poster = item.attrib.get('thumb')
|
||||
if poster:
|
||||
poster = api.attach_plex_token_to_url(
|
||||
"%s%s" % (self.server, poster))
|
||||
artwork.modify_art(
|
||||
poster, episodeid, v.KODI_TYPE_EPISODE, "thumb", kodicursor)
|
||||
artwork.modify_artwork(api.artwork(),
|
||||
episodeid,
|
||||
v.KODI_TYPE_EPISODE,
|
||||
kodicursor)
|
||||
streams = api.mediastreams()
|
||||
self.kodi_db.modify_streams(fileid, streams, runtime)
|
||||
self.kodi_db.addPlaystate(fileid,
|
||||
|
|
Loading…
Reference in a new issue