From 33d20f0d0b9f5899bdc387f75a47fb1d1d65d923 Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 9 Jul 2019 07:54:17 +0200 Subject: [PATCH] Fix `Plex.nodes..path` not linking directly to entire library --- resources/lib/library_sync/sections.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/resources/lib/library_sync/sections.py b/resources/lib/library_sync/sections.py index b6999b8d..14563598 100644 --- a/resources/lib/library_sync/sections.py +++ b/resources/lib/library_sync/sections.py @@ -240,12 +240,17 @@ class Section(object): # Main list entry for this section - which will show the different # nodes as "submenus" once the user navigates into this section if self.sync_to_kodi and self.section_type in v.PLEX_VIDEOTYPES: + # Node showing a menu for this section args = { 'mode': 'show_section', 'section_index': self.index } - path = utils.extend_url('plugin://%s' % v.ADDON_ID, args) + index = utils.extend_url('plugin://%s' % v.ADDON_ID, args) + # Node directly displaying all content + path = 'library://video/Plex-{0}/{0}_all.xml' + path = path.format(self.section_id) else: + # Node showing a menu for this section args = { 'mode': 'browseplex', 'key': '/library/sections/%s/all' % self.section_id, @@ -255,12 +260,20 @@ class Section(object): args['synched'] = 'false' # No library xmls to speed things up # Immediately show the PMS options for this section + index = self.addon_path(args) + # Node directly displaying all content + args = { + 'mode': 'browseplex', + 'key': '/library/sections/%s/all' % self.section_id, + 'section_id': unicode(self.section_id) + } + if not self.sync_to_kodi: + args['synched'] = 'false' path = self.addon_path(args) - index = path utils.window('%s.index' % self.node, value=index) utils.window('%s.title' % self.node, value=self.name) utils.window('%s.type' % self.node, value=self.content) - utils.window('%s.content' % self.node, value=path) + utils.window('%s.content' % self.node, value=index) # .path leads to all elements of this library if self.section_type in v.PLEX_VIDEOTYPES: utils.window('%s.path' % self.node,