diff --git a/addon.xml b/addon.xml index 121844b..63993a7 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/functions.py b/resources/lib/functions.py index 8b0bce0..f5bb2ff 100644 --- a/resources/lib/functions.py +++ b/resources/lib/functions.py @@ -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') diff --git a/resources/lib/item_functions.py b/resources/lib/item_functions.py index 5bfe7cd..563c75e 100644 --- a/resources/lib/item_functions.py +++ b/resources/lib/item_functions.py @@ -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 diff --git a/resources/lib/widgets.py b/resources/lib/widgets.py index f350919..8ef6b01 100644 --- a/resources/lib/widgets.py +++ b/resources/lib/widgets.py @@ -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)