Fix 'all' video node not leading to all library items
This commit is contained in:
parent
a2b57909cb
commit
9a6485737f
2 changed files with 14 additions and 7 deletions
|
@ -84,7 +84,7 @@ def show_main_menu(content_type=None):
|
||||||
# Get nodes from the window props
|
# Get nodes from the window props
|
||||||
totalnodes = int(utils.window('Plex.nodes.total') or 0)
|
totalnodes = int(utils.window('Plex.nodes.total') or 0)
|
||||||
for i in range(totalnodes):
|
for i in range(totalnodes):
|
||||||
path = utils.window('Plex.nodes.%s.content' % i)
|
path = utils.window('Plex.nodes.%s.index' % i)
|
||||||
if not path:
|
if not path:
|
||||||
continue
|
continue
|
||||||
label = utils.window('Plex.nodes.%s.title' % i)
|
label = utils.window('Plex.nodes.%s.title' % i)
|
||||||
|
@ -114,9 +114,9 @@ def show_main_menu(content_type=None):
|
||||||
continue
|
continue
|
||||||
# Add ANOTHER menu item that uses add-on paths instead of direct
|
# Add ANOTHER menu item that uses add-on paths instead of direct
|
||||||
# paths in order to let the user navigate into all submenus
|
# paths in order to let the user navigate into all submenus
|
||||||
addon_path = utils.window('Plex.nodes.%s.addon_path' % i)
|
addon_index = utils.window('Plex.nodes.%s.addon_index' % i)
|
||||||
# Append "(More...)" to the label
|
# Append "(More...)" to the label
|
||||||
directory_item('%s (%s)' % (label, utils.lang(22082)), addon_path)
|
directory_item('%s (%s)' % (label, utils.lang(22082)), addon_index)
|
||||||
# Playlists
|
# Playlists
|
||||||
if content_type != 'image':
|
if content_type != 'image':
|
||||||
path = 'plugin://%s?mode=playlists' % v.ADDON_ID
|
path = 'plugin://%s?mode=playlists' % v.ADDON_ID
|
||||||
|
|
|
@ -246,20 +246,27 @@ class Section(object):
|
||||||
}
|
}
|
||||||
if not self.sync_to_kodi:
|
if not self.sync_to_kodi:
|
||||||
args['synched'] = 'false'
|
args['synched'] = 'false'
|
||||||
addon_path = self.addon_path(args)
|
addon_index = self.addon_path(args)
|
||||||
if self.sync_to_kodi and self.section_type in v.PLEX_VIDEOTYPES:
|
if self.sync_to_kodi and self.section_type in v.PLEX_VIDEOTYPES:
|
||||||
path = 'library://video/Plex-%s' % self.section_id
|
path = 'library://video/Plex-{0}/{0}_all.xml'
|
||||||
|
path = path.format(self.section_id)
|
||||||
|
index = 'library://video/Plex-%s' % self.section_id
|
||||||
else:
|
else:
|
||||||
# No xmls to link to - let's show the listings on the fly
|
# No xmls to link to - let's show the listings on the fly
|
||||||
path = addon_path
|
index = addon_index
|
||||||
|
args['key'] = '/library/sections/%s/all' % self.section_id
|
||||||
|
path = self.addon_path(args)
|
||||||
|
# .index will list all possible nodes for this library
|
||||||
|
utils.window('%s.index' % self.node, value=index)
|
||||||
utils.window('%s.title' % self.node, value=self.name)
|
utils.window('%s.title' % self.node, value=self.name)
|
||||||
utils.window('%s.type' % self.node, value=self.content)
|
utils.window('%s.type' % self.node, value=self.content)
|
||||||
utils.window('%s.content' % self.node, value=path)
|
utils.window('%s.content' % self.node, value=path)
|
||||||
|
# .path leads to all elements of this library
|
||||||
utils.window('%s.path' % self.node,
|
utils.window('%s.path' % self.node,
|
||||||
value='ActivateWindow(Videos,%s,return)' % path)
|
value='ActivateWindow(Videos,%s,return)' % path)
|
||||||
utils.window('%s.id' % self.node, value=str(self.section_id))
|
utils.window('%s.id' % self.node, value=str(self.section_id))
|
||||||
# To let the user navigate into this node when selecting widgets
|
# To let the user navigate into this node when selecting widgets
|
||||||
utils.window('%s.addon_path' % self.node, value=addon_path)
|
utils.window('%s.addon_index' % self.node, value=addon_index)
|
||||||
if not self.sync_to_kodi:
|
if not self.sync_to_kodi:
|
||||||
self.remove_files_from_kodi()
|
self.remove_files_from_kodi()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue