mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 21:56:13 +00:00
Create video nodes/playlist using the id
Prevent errors with special characters that have no ascii replacement
This commit is contained in:
parent
9670e87049
commit
81ea279319
3 changed files with 28 additions and 21 deletions
|
@ -52,16 +52,15 @@ class VideoNodes(object):
|
|||
|
||||
return root
|
||||
|
||||
def viewNode(self, indexnumber, tagname, mediatype, viewtype, delete=False):
|
||||
def viewNode(self, indexnumber, tagname, mediatype, viewtype, viewid, delete=False):
|
||||
|
||||
window = utils.window
|
||||
kodiversion = self.kodiversion
|
||||
|
||||
cleantagname = utils.normalize_nodes(tagname.encode('utf-8'))
|
||||
if viewtype == "mixed":
|
||||
dirname = "%s - %s" % (cleantagname, mediatype)
|
||||
dirname = "%s - %s" % (viewid, mediatype)
|
||||
else:
|
||||
dirname = cleantagname
|
||||
dirname = viewid
|
||||
|
||||
path = xbmc.translatePath("special://profile/library/video/").decode('utf-8')
|
||||
nodepath = xbmc.translatePath(
|
||||
|
@ -182,7 +181,7 @@ class VideoNodes(object):
|
|||
for node in nodes:
|
||||
|
||||
nodetype = nodetypes[node]
|
||||
nodeXML = "%s%s_%s.xml" % (nodepath, cleantagname, nodetype)
|
||||
nodeXML = "%s%s_%s.xml" % (nodepath, viewid, nodetype)
|
||||
# Get label
|
||||
stringid = nodes[node]
|
||||
if node != "1":
|
||||
|
@ -211,7 +210,7 @@ class VideoNodes(object):
|
|||
# Custom query
|
||||
path = "plugin://plugin.video.emby/?id=%s&mode=inprogressepisodes&limit=25"% tagname
|
||||
else:
|
||||
path = "library://video/Emby - %s/%s_%s.xml" % (dirname, cleantagname, nodetype)
|
||||
path = "library://video/Emby - %s/%s_%s.xml" % (dirname, viewid, nodetype)
|
||||
|
||||
if mediatype == "photos":
|
||||
windowpath = "ActivateWindow(Pictures,%s,return)" % path
|
||||
|
@ -221,7 +220,7 @@ class VideoNodes(object):
|
|||
if nodetype == "all":
|
||||
|
||||
if viewtype == "mixed":
|
||||
templabel = dirname
|
||||
templabel = "%s - %s" % (tagname, mediatype)
|
||||
else:
|
||||
templabel = label
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue