Fix KeyError: u'game' if Plex Arcade has been activated
This commit is contained in:
parent
b9f1aefdc3
commit
63d7732021
2 changed files with 9 additions and 0 deletions
|
@ -647,6 +647,9 @@ def _sync_from_pms(pick_libraries):
|
||||||
sections = []
|
sections = []
|
||||||
old_sections = []
|
old_sections = []
|
||||||
for i, xml_element in enumerate(xml.findall('Directory')):
|
for i, xml_element in enumerate(xml.findall('Directory')):
|
||||||
|
api = API(xml_element)
|
||||||
|
if api.plex_type in v.UNSUPPORTED_PLEX_TYPES:
|
||||||
|
continue
|
||||||
sections.append(Section(index=i, xml_element=xml_element))
|
sections.append(Section(index=i, xml_element=xml_element))
|
||||||
with PlexDB() as plexdb:
|
with PlexDB() as plexdb:
|
||||||
for section_db in plexdb.all_sections():
|
for section_db in plexdb.all_sections():
|
||||||
|
|
|
@ -161,9 +161,15 @@ PLEX_TYPE_PHOTO = 'photo'
|
||||||
PLEX_TYPE_PLAYLIST = 'playlist'
|
PLEX_TYPE_PLAYLIST = 'playlist'
|
||||||
PLEX_TYPE_CHANNEL = 'channel'
|
PLEX_TYPE_CHANNEL = 'channel'
|
||||||
|
|
||||||
|
PLEX_TYPE_GAME = 'game'
|
||||||
|
|
||||||
# E.g. PMS answer when hitting the PMS endpoint /hubs/search
|
# E.g. PMS answer when hitting the PMS endpoint /hubs/search
|
||||||
PLEX_TYPE_TAG = 'tag'
|
PLEX_TYPE_TAG = 'tag'
|
||||||
|
|
||||||
|
# PlexKodiConnect does not support all (content) types
|
||||||
|
# e.g. Plex Arcade games
|
||||||
|
UNSUPPORTED_PLEX_TYPES = (PLEX_TYPE_GAME, )
|
||||||
|
|
||||||
# Used for /:/timeline XML messages
|
# Used for /:/timeline XML messages
|
||||||
PLEX_PLAYLIST_TYPE_VIDEO = 'video'
|
PLEX_PLAYLIST_TYPE_VIDEO = 'video'
|
||||||
PLEX_PLAYLIST_TYPE_AUDIO = 'music'
|
PLEX_PLAYLIST_TYPE_AUDIO = 'music'
|
||||||
|
|
Loading…
Reference in a new issue