parent
00613e7ef5
commit
3bba2199e8
2 changed files with 27 additions and 19 deletions
|
@ -772,15 +772,16 @@ class API(object):
|
|||
# Artwork lookup for episodes is broken for addon paths
|
||||
# Episodes is a bit special, only get the thumb, because all
|
||||
# the other artwork will be saved under season and show
|
||||
for kodi_artwork, plex_artwork in v.KODI_TO_PLEX_ARTWORK.iteritems():
|
||||
for kodi_artwork, plex_artwork in \
|
||||
v.KODI_TO_PLEX_ARTWORK_EPISODE.iteritems():
|
||||
art = self._one_artwork(plex_artwork)
|
||||
if art:
|
||||
artworks[kodi_artwork] = art
|
||||
if full_artwork:
|
||||
if not full_artwork:
|
||||
return artworks
|
||||
with plexdb.Get_Plex_DB() as plex_db:
|
||||
db_item = plex_db.getItem_byId(self.plex_id())
|
||||
try:
|
||||
season_id = db_item[3]
|
||||
season_id = plex_db.getItem_byId(self.plex_id())[3]
|
||||
except TypeError:
|
||||
return artworks
|
||||
# Grab artwork from the season
|
||||
|
@ -790,9 +791,9 @@ class API(object):
|
|||
artworks['season.%s' % kodi_art] = season_art[kodi_art]
|
||||
# Get the show id
|
||||
with plexdb.Get_Plex_DB() as plex_db:
|
||||
db_item = plex_db.getItem_byId(self.grandparent_id())
|
||||
try:
|
||||
show_id = db_item[0]
|
||||
show_id = plex_db.getItem_byKodiId(season_id,
|
||||
v.KODI_TYPE_SEASON)[1]
|
||||
except TypeError:
|
||||
return artworks
|
||||
# Grab more artwork from the show
|
||||
|
|
|
@ -325,6 +325,13 @@ KODI_TO_PLEX_ARTWORK = {
|
|||
'fanart': 'art'
|
||||
}
|
||||
|
||||
KODI_TO_PLEX_ARTWORK_EPISODE = {
|
||||
'thumb': 'thumb',
|
||||
'poster': 'grandparentThumb',
|
||||
'banner': 'banner',
|
||||
'fanart': 'art'
|
||||
}
|
||||
|
||||
# Might be implemented in the future: 'icon', 'landscape' (16:9)
|
||||
ALL_KODI_ARTWORK = (
|
||||
'thumb',
|
||||
|
|
Loading…
Reference in a new issue