set some more container content type and item types

This commit is contained in:
Shaun
2018-01-18 10:04:17 +11:00
parent 1ff82b0d1c
commit c9c76401af
4 changed files with 15 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.embycon"
name="EmbyCon"
version="1.4.31"
version="1.4.32"
provider-name="Team B">
<requires>
<import addon="xbmc.python" version="2.25.0"/>

View File

@@ -323,6 +323,9 @@ def getContent(url, params):
if media_type.startswith("movie"):
viewType = "Movies"
xbmcplugin.setContent(pluginhandle, 'movies')
elif media_type == "music": # this is albums
viewType = "Albums"
xbmcplugin.setContent(pluginhandle, 'albums')
elif media_type == "music" or media_type == "audio" or media_type == "musicalbum":
viewType = "Music"
xbmcplugin.setContent(pluginhandle, 'songs')

View File

@@ -387,15 +387,19 @@ def add_gui_item(url, item_details, display_options, folder=True):
item_type = item_details.item_type.lower()
mediatype = 'video'
if item_type == 'movie' or item_type == 'boxset':
if item_type == 'movie':
mediatype = 'movie'
elif item_type == 'boxset':
mediatype = 'set'
elif item_type == 'series':
mediatype = 'tvshow'
elif item_type == 'season':
mediatype = 'season'
elif item_type == 'episode':
mediatype = 'episode'
elif item_type == 'audio' or item_type == 'musicalbum' or item_type == 'music':
elif item_type == 'musicalbum':
mediatype = 'album'
elif item_type == 'audio' or item_type == 'music':
mediatype = 'song'
videoInfoLabels["mediatype"] = mediatype

View File

@@ -186,12 +186,17 @@ def getWidgetContentCast(handle, params):
artLinks["poster"] = person_thumbnail
list_item.setArt(artLinks)
labels = {}
labels["mediatype"] = "artist"
list_item.setInfo(type="music", infoLabels=labels)
if person_role:
list_item.setLabel2(person_role)
itemTupple = ("", list_item, False)
listItems.append(itemTupple)
xbmcplugin.setContent(handle, 'artists')
xbmcplugin.addDirectoryItems(handle, listItems)
xbmcplugin.endOfDirectory(handle, cacheToDisc=False)