Fix KodiItemTypes
This commit is contained in:
parent
bcbbb1b42f
commit
a4e1a622e0
2 changed files with 9 additions and 9 deletions
|
@ -42,17 +42,17 @@ def GetItemClassFromType(itemType):
|
||||||
|
|
||||||
|
|
||||||
def GetKodiTypeFromPlex(plexItemType):
|
def GetKodiTypeFromPlex(plexItemType):
|
||||||
classes = {
|
"""
|
||||||
'movie': 'video',
|
As used in playlist.item here: http://kodi.wiki/view/JSON-RPC_API
|
||||||
'episode': 'video',
|
"""
|
||||||
}
|
|
||||||
return classes[plexItemType.lower()]
|
|
||||||
|
|
||||||
|
|
||||||
def GetKodiItemTypeFromPlex(plexItemType):
|
|
||||||
classes = {
|
classes = {
|
||||||
'movie': 'movie',
|
'movie': 'movie',
|
||||||
'episode': 'episode',
|
'episode': 'episode',
|
||||||
|
'track': 'song',
|
||||||
|
'artist': 'artist',
|
||||||
|
'album': 'album',
|
||||||
|
'XXXXXX': 'musicvideo',
|
||||||
|
'XXXXXXX': 'genre'
|
||||||
}
|
}
|
||||||
return classes[plexItemType.lower()]
|
return classes[plexItemType.lower()]
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ class PlaybackUtils():
|
||||||
self.logMsg("Adding main item to playlist.", 1)
|
self.logMsg("Adding main item to playlist.", 1)
|
||||||
self.pl.addtoPlaylist(
|
self.pl.addtoPlaylist(
|
||||||
dbid,
|
dbid,
|
||||||
PF.GetKodiItemTypeFromPlex(API.getType()))
|
PF.GetKodiTypeFromPlex(API.getType()))
|
||||||
|
|
||||||
# Ensure that additional parts are played after the main item
|
# Ensure that additional parts are played after the main item
|
||||||
self.currentPosition += 1
|
self.currentPosition += 1
|
||||||
|
|
Loading…
Reference in a new issue