Link episode ListItem with Kodi library item

Enables full metadata such as Show and Season info
This commit is contained in:
Croneter 2018-03-20 11:26:01 +01:00
parent 3c1bb34f86
commit 524466360f

View file

@ -1420,10 +1420,7 @@ class API(object):
listitem.setProperty('totaltime', str(userdata['Runtime'])) listitem.setProperty('totaltime', str(userdata['Runtime']))
if typus == v.PLEX_TYPE_EPISODE: if typus == v.PLEX_TYPE_EPISODE:
if state.DIRECT_PATHS: metadata['mediatype'] = 'episode'
# Do NOT set a link to the Kodi DB to force Kodi to use our
# ListItem artwork for Addon Paths
metadata['mediatype'] = 'episode'
_, show, season, episode = self.episode_data() _, show, season, episode = self.episode_data()
season = -1 if season is None else int(season) season = -1 if season is None else int(season)
episode = -1 if episode is None else int(episode) episode = -1 if episode is None else int(episode)