def kodi_navigation_gui(slotvalue,session_id): #for the kodi GUI.ActivateWindow. prepares values before send ausgabe('kodi_navigation_gui',1) window="" filtervalue="" if slotvalue == 'home': window='home' elif slotvalue == 'music': window='music' filtervalue="musicdb://" elif slotvalue == 'videos': window='videos' filtervalue="videodb://movies/titles/" elif slotvalue == 'shows': window='videos' filtervalue="videodb://tvshows/titles/" elif slotvalue == 'videoaddon': window='programs' filtervalue="addons://sources/video/" elif slotvalue == 'audiaddon': window='programs' filtervalue="addons://sources/audio/" elif slotvalue == 'executableaddon': window='programs' filtervalue="addons://sources/executable/" elif slotvalue == 'useraddon': window='programs' filtervalue="addons://user/" else: window = slotvalue kodi.open_gui(window=window,filtervalue=filtervalue) end_session(session_id) return
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)