Merge pull request #1329 from croneter/p2-fix-keyerror
Fix KeyError: u'game' if Plex Arcade has been activated
This commit is contained in:
commit
3e1f52802f
2 changed files with 9 additions and 0 deletions
|
@ -650,6 +650,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():
|
||||||
|
|
|
@ -189,9 +189,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