Browse video nodes by folder/path
This commit is contained in:
parent
be7ecb95db
commit
6f7d5d5d59
2 changed files with 53 additions and 43 deletions
|
@ -516,4 +516,5 @@
|
||||||
|
|
||||||
<string id="39700">Amazon Alexa (Voice Recognition)</string>
|
<string id="39700">Amazon Alexa (Voice Recognition)</string>
|
||||||
<string id="39701">Activate Alexa</string>
|
<string id="39701">Activate Alexa</string>
|
||||||
|
<string id="39702">Browse by folder</string>
|
||||||
</strings>
|
</strings>
|
||||||
|
|
|
@ -131,58 +131,64 @@ class VideoNodes(object):
|
||||||
'9': "genres",
|
'9': "genres",
|
||||||
'10': "random",
|
'10': "random",
|
||||||
'11': "recommended",
|
'11': "recommended",
|
||||||
'12': "ondeck"
|
'12': "ondeck",
|
||||||
|
'13': 'browsefiles'
|
||||||
}
|
}
|
||||||
mediatypes = {
|
mediatypes = {
|
||||||
# label according to nodetype per mediatype
|
# label according to nodetype per mediatype
|
||||||
'movies':
|
'movies':
|
||||||
{
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
'2': 30174,
|
'2': 30174,
|
||||||
# '4': 30177,
|
# '4': 30177,
|
||||||
# '6': 30189,
|
# '6': 30189,
|
||||||
'8': 39501,
|
'8': 39501,
|
||||||
'9': 135,
|
'9': 135,
|
||||||
'10': 30227,
|
'10': 30227,
|
||||||
'11': 30230,
|
'11': 30230,
|
||||||
'12': 39500,
|
'12': 39500,
|
||||||
|
'13': 39702
|
||||||
},
|
},
|
||||||
|
|
||||||
'tvshows':
|
'tvshows':
|
||||||
{
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
# '2': 30170,
|
# '2': 30170,
|
||||||
'3': 30174,
|
'3': 30174,
|
||||||
# '4': 30171,
|
# '4': 30171,
|
||||||
# '5': 30178,
|
# '5': 30178,
|
||||||
# '7': 30179,
|
# '7': 30179,
|
||||||
'9': 135,
|
'9': 135,
|
||||||
'10': 30227,
|
'10': 30227,
|
||||||
# '11': 30230,
|
# '11': 30230,
|
||||||
'12': 39500,
|
'12': 39500,
|
||||||
},
|
'13': 39702
|
||||||
|
|
||||||
'homevideos':
|
|
||||||
{
|
|
||||||
'1': tagname,
|
|
||||||
'2': 30251,
|
|
||||||
'11': 30253
|
|
||||||
},
|
|
||||||
|
|
||||||
'photos':
|
|
||||||
{
|
|
||||||
'1': tagname,
|
|
||||||
'2': 30252,
|
|
||||||
'8': 30255,
|
|
||||||
'11': 30254
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'musicvideos':
|
'homevideos':
|
||||||
{
|
{
|
||||||
'1': tagname,
|
'1': tagname,
|
||||||
'2': 30256,
|
'2': 30251,
|
||||||
'4': 30257,
|
'11': 30253,
|
||||||
'6': 30258
|
'13': 39702
|
||||||
|
},
|
||||||
|
|
||||||
|
'photos':
|
||||||
|
{
|
||||||
|
'1': tagname,
|
||||||
|
'2': 30252,
|
||||||
|
'8': 30255,
|
||||||
|
'11': 30254,
|
||||||
|
'13': 39702
|
||||||
|
},
|
||||||
|
|
||||||
|
'musicvideos':
|
||||||
|
{
|
||||||
|
'1': tagname,
|
||||||
|
'2': 30256,
|
||||||
|
'4': 30257,
|
||||||
|
'6': 30258,
|
||||||
|
'13': 39702
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,6 +206,7 @@ class VideoNodes(object):
|
||||||
'10': '8', # "random",
|
'10': '8', # "random",
|
||||||
'11': '5', # "recommended",
|
'11': '5', # "recommended",
|
||||||
'12': '1', # "ondeck"
|
'12': '1', # "ondeck"
|
||||||
|
'13': '9' # browse by folder
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes = mediatypes[mediatype]
|
nodes = mediatypes[mediatype]
|
||||||
|
@ -244,6 +251,8 @@ class VideoNodes(object):
|
||||||
elif mediatype =="movies":
|
elif mediatype =="movies":
|
||||||
# Reset nodetype; we got the label
|
# Reset nodetype; we got the label
|
||||||
nodetype = 'inprogress'
|
nodetype = 'inprogress'
|
||||||
|
elif nodetype == 'browsefiles':
|
||||||
|
path = 'plugin://plugin.video.plexkodiconnect?mode=browseplex&key=/library/sections/%s/folder' % viewid
|
||||||
else:
|
else:
|
||||||
path = "library://video/Plex-%s/%s_%s.xml" % (dirname, viewid, nodetype)
|
path = "library://video/Plex-%s/%s_%s.xml" % (dirname, viewid, nodetype)
|
||||||
|
|
||||||
|
@ -285,7 +294,7 @@ class VideoNodes(object):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Create the root
|
# Create the root
|
||||||
if (nodetype in ("nextepisodes", "ondeck", 'recentepisodes') or mediatype == "homevideos"):
|
if (nodetype in ("nextepisodes", "ondeck", 'recentepisodes', 'browsefiles') or mediatype == "homevideos"):
|
||||||
# Folder type with plugin path
|
# Folder type with plugin path
|
||||||
root = self.commonRoot(order=sortorder[node], label=label, tagname=tagname, roottype=2)
|
root = self.commonRoot(order=sortorder[node], label=label, tagname=tagname, roottype=2)
|
||||||
etree.SubElement(root, 'path').text = path
|
etree.SubElement(root, 'path').text = path
|
||||||
|
|
Loading…
Reference in a new issue