def search(slotvalue,slotname,json_d): #check if word is in titles of the kodi library. e.g. marvel will be in more than 1 title. if found it will display it in kodi ausgabe("search",1) titles = kodi.find_title(slotvalue,json_d) if len(titles) ==0: return "Aucun média trouvé" elif len(titles) >=1: ausgabe('slotname: '+slotname,2) if slotname == 'shows': mediatype = 'tvshows' elif slotname =='movies': mediatype = 'movies' kodi.open_gui("", mediatype, slotvalue,isfilter=1) return(titles)
def search(slotvalue,slotname,json_d): #check if word is in titles of the kodi library. e.g. marvel will be in more than 1 title. if found it will display it in kodi ausgabe("search",1) titles = kodi.find_title(slotvalue,json_d) if len(titles) ==0: start_session(session_type="notification", text="keine medien gefunden") elif len(titles) >=1: ausgabe('slotname: '+slotname,2) if slotname == 'shows': mediatype = 'tvshows' elif slotname =='movies': mediatype = 'movies' elif slotname == 'artist' or slotname == 'albums': mediatype = 'artists' kodi.open_gui("", mediatype, slotvalue,isfilter=1) return(titles)