Fix KeyError for librarysync
This commit is contained in:
parent
e90f48cc8e
commit
0a2f1bc01b
2 changed files with 11 additions and 1 deletions
|
@ -83,6 +83,16 @@ ITEMTYPE_FROM_PLEXTYPE = {
|
||||||
PLEX_TYPE_SONG: 'Music',
|
PLEX_TYPE_SONG: 'Music',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ITEMTYPE_FROM_KODITYPE = {
|
||||||
|
KODI_TYPE_MOVIE: 'Movies',
|
||||||
|
KODI_TYPE_SEASON: 'TVShows',
|
||||||
|
KODI_TYPE_EPISODE: 'TVShows',
|
||||||
|
KODI_TYPE_SHOW: 'TVShows',
|
||||||
|
KODI_TYPE_ARTIST: 'Music',
|
||||||
|
KODI_TYPE_ALBUM: 'Music',
|
||||||
|
KODI_TYPE_SONG: 'Music',
|
||||||
|
}
|
||||||
|
|
||||||
KODITYPE_FROM_PLEXTYPE = {
|
KODITYPE_FROM_PLEXTYPE = {
|
||||||
PLEX_TYPE_MOVIE: KODI_TYPE_MOVIE,
|
PLEX_TYPE_MOVIE: KODI_TYPE_MOVIE,
|
||||||
PLEX_TYPE_EPISODE: KODI_TYPE_EPISODE,
|
PLEX_TYPE_EPISODE: KODI_TYPE_EPISODE,
|
||||||
|
|
|
@ -1666,7 +1666,7 @@ class LibrarySync(Thread):
|
||||||
# Now tell Kodi where we are
|
# Now tell Kodi where we are
|
||||||
for item in items:
|
for item in items:
|
||||||
itemFkt = getattr(itemtypes,
|
itemFkt = getattr(itemtypes,
|
||||||
PF.ITEMTYPE_FROM_PLEXTYPE[item['kodi_type']])
|
PF.ITEMTYPE_FROM_KODITYPE[item['kodi_type']])
|
||||||
with itemFkt() as Fkt:
|
with itemFkt() as Fkt:
|
||||||
Fkt.updatePlaystate(item)
|
Fkt.updatePlaystate(item)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue