add songs and albums to search
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.embycon"
|
||||
name="EmbyCon"
|
||||
version="1.5.7"
|
||||
version="1.5.8"
|
||||
provider-name="Team B">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.25.0"/>
|
||||
|
||||
@@ -814,14 +814,27 @@ def searchResults(params):
|
||||
query_string = urllib.quote(query_string)
|
||||
log.debug("query_string : {0}", query_string)
|
||||
|
||||
if item_type.lower() == 'movie':
|
||||
item_type = item_type.lower()
|
||||
|
||||
if item_type == 'movie':
|
||||
heading_type = i18n('movies')
|
||||
elif item_type.lower() == 'series':
|
||||
content_type = 'movies'
|
||||
elif item_type == 'series':
|
||||
heading_type = i18n('tvshows')
|
||||
elif item_type.lower() == 'episode':
|
||||
content_type = 'tvshows'
|
||||
elif item_type == 'episode':
|
||||
heading_type = i18n('episodes')
|
||||
content_type = 'episodes'
|
||||
params["name_format"] = "Episode|episode_name_format"
|
||||
elif item_type == "music" or item_type == "audio" or item_type == "musicalbum":
|
||||
heading_type = 'Music'
|
||||
content_type = 'songs'
|
||||
elif item_type == "musicartists":
|
||||
heading_type = 'Artists'
|
||||
content_type = 'artists'
|
||||
else:
|
||||
heading_type = item_type
|
||||
content_type = 'video'
|
||||
|
||||
handle = int(sys.argv[1])
|
||||
|
||||
@@ -860,15 +873,18 @@ def searchResults(params):
|
||||
'&IncludeStudios=false' +
|
||||
'&IncludeArtists=false')
|
||||
|
||||
if item_type.lower() == 'movie':
|
||||
xbmcplugin.setContent(handle, 'movies')
|
||||
elif item_type.lower() == 'series':
|
||||
xbmcplugin.setContent(handle, 'tvshows')
|
||||
elif item_type.lower() == 'episode':
|
||||
xbmcplugin.setContent(handle, 'episodes')
|
||||
params["name_format"] = "Episode|episode_name_format"
|
||||
else:
|
||||
xbmcplugin.setContent(handle, 'videos')
|
||||
if item_type == "musicartists":
|
||||
content_url = ('{server}/emby/Search/Hints?searchTerm=' + query +
|
||||
'&UserId={userid}' +
|
||||
'&Limit=' + str(limit) +
|
||||
'&IncludePeople=false' +
|
||||
'&IncludeMedia=false' +
|
||||
'&IncludeGenres=false' +
|
||||
'&IncludeStudios=false' +
|
||||
'&IncludeArtists=true')
|
||||
|
||||
# set content type
|
||||
xbmcplugin.setContent(handle, content_type)
|
||||
|
||||
# show a progress indicator if needed
|
||||
settings = xbmcaddon.Addon()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# coding=utf-8
|
||||
# Gnu General Public License - see LICENSE.TXT
|
||||
|
||||
import sys
|
||||
@@ -708,6 +709,9 @@ def showSearch():
|
||||
addMenuDirectoryItem(i18n('movies'), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Movie')
|
||||
addMenuDirectoryItem(i18n('tvshows'), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Series')
|
||||
addMenuDirectoryItem(i18n('episodes'), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Episode')
|
||||
addMenuDirectoryItem("Song", 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Audio')
|
||||
addMenuDirectoryItem("Album", 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=MusicAlbum')
|
||||
#addMenuDirectoryItem("Artist", 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=MusicArtists')
|
||||
|
||||
xbmcplugin.endOfDirectory(int(sys.argv[1]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user