mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
add favourite episodes node
This commit is contained in:
parent
bcd8f576df
commit
c3eb8a5598
3 changed files with 9 additions and 0 deletions
|
@ -605,6 +605,9 @@ def BrowseContent(viewname, browse_type="", folderid=""):
|
||||||
listing = emby.getFilteredSection(folderid, itemtype=itemtype.split(",")[0], sortby="Random", recursive=True, limit=150, sortorder="Descending")
|
listing = emby.getFilteredSection(folderid, itemtype=itemtype.split(",")[0], sortby="Random", recursive=True, limit=150, sortorder="Descending")
|
||||||
elif filter_type == "recommended":
|
elif filter_type == "recommended":
|
||||||
listing = emby.getFilteredSection(folderid, itemtype=itemtype.split(",")[0], sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter_type="IsFavorite")
|
listing = emby.getFilteredSection(folderid, itemtype=itemtype.split(",")[0], sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter_type="IsFavorite")
|
||||||
|
elif folderid == "favepisodes":
|
||||||
|
xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
|
||||||
|
listing = emby.getFilteredSection(None, itemtype="Episode", sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter_type="IsFavorite")
|
||||||
elif filter_type == "sets":
|
elif filter_type == "sets":
|
||||||
listing = emby.getFilteredSection(folderid, itemtype=itemtype.split(",")[1], sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter_type="IsFavorite")
|
listing = emby.getFilteredSection(folderid, itemtype=itemtype.split(",")[1], sortby="SortName", recursive=True, limit=25, sortorder="Ascending", filter_type="IsFavorite")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -582,6 +582,8 @@ class LibrarySync(threading.Thread):
|
||||||
totalnodes += 1
|
totalnodes += 1
|
||||||
self.vnodes.singleNode(totalnodes, "Favorite tvshows", "tvshows", "favourites")
|
self.vnodes.singleNode(totalnodes, "Favorite tvshows", "tvshows", "favourites")
|
||||||
totalnodes += 1
|
totalnodes += 1
|
||||||
|
self.vnodes.singleNode(totalnodes, "Favorite episodes", "episodes", "favourites")
|
||||||
|
totalnodes += 1
|
||||||
self.vnodes.singleNode(totalnodes, "channels", "movies", "channels")
|
self.vnodes.singleNode(totalnodes, "channels", "movies", "channels")
|
||||||
totalnodes += 1
|
totalnodes += 1
|
||||||
# Save total
|
# Save total
|
||||||
|
|
|
@ -333,6 +333,7 @@ class VideoNodes(object):
|
||||||
|
|
||||||
'Favorite movies': 30180,
|
'Favorite movies': 30180,
|
||||||
'Favorite tvshows': 30181,
|
'Favorite tvshows': 30181,
|
||||||
|
'Favorite episodes': 30182,
|
||||||
'channels': 30173
|
'channels': 30173
|
||||||
}
|
}
|
||||||
label = lang(labels[tagname])
|
label = lang(labels[tagname])
|
||||||
|
@ -349,6 +350,9 @@ class VideoNodes(object):
|
||||||
if itemtype == "channels":
|
if itemtype == "channels":
|
||||||
root = self.commonRoot(order=1, label=label, tagname=tagname, roottype=2)
|
root = self.commonRoot(order=1, label=label, tagname=tagname, roottype=2)
|
||||||
etree.SubElement(root, 'path').text = "plugin://plugin.video.emby/?id=0&mode=channels"
|
etree.SubElement(root, 'path').text = "plugin://plugin.video.emby/?id=0&mode=channels"
|
||||||
|
elif itemtype == "favourites" and mediatype == "episodes":
|
||||||
|
root = self.commonRoot(order=1, label=label, tagname=tagname, roottype=2)
|
||||||
|
etree.SubElement(root, 'path').text = "plugin://plugin.video.emby/?id=%s&mode=browsecontent&type=%s&folderid=favepisodes" %(tagname, mediatype)
|
||||||
else:
|
else:
|
||||||
root = self.commonRoot(order=1, label=label, tagname=tagname)
|
root = self.commonRoot(order=1, label=label, tagname=tagname)
|
||||||
etree.SubElement(root, 'order', {'direction': "ascending"}).text = "sorttitle"
|
etree.SubElement(root, 'order', {'direction': "ascending"}).text = "sorttitle"
|
||||||
|
|
Loading…
Reference in a new issue