diff --git a/resources/lib/library_sync/sections.py b/resources/lib/library_sync/sections.py index 84576a6f..295e5572 100644 --- a/resources/lib/library_sync/sections.py +++ b/resources/lib/library_sync/sections.py @@ -647,6 +647,9 @@ def _sync_from_pms(pick_libraries): sections = [] old_sections = [] 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)) with PlexDB() as plexdb: for section_db in plexdb.all_sections(): diff --git a/resources/lib/variables.py b/resources/lib/variables.py index 1b7dfa3f..86b23cae 100644 --- a/resources/lib/variables.py +++ b/resources/lib/variables.py @@ -161,9 +161,15 @@ PLEX_TYPE_PHOTO = 'photo' PLEX_TYPE_PLAYLIST = 'playlist' PLEX_TYPE_CHANNEL = 'channel' +PLEX_TYPE_GAME = 'game' + # E.g. PMS answer when hitting the PMS endpoint /hubs/search 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 PLEX_PLAYLIST_TYPE_VIDEO = 'video' PLEX_PLAYLIST_TYPE_AUDIO = 'music'