def get_search(): slist = site2list() menuItems = slist[1] selecturl = xbmcgui.Dialog().select('Select Sites', menuItems) qry = get_keyboard('ค้นหา', default='') # xbmcgui.Dialog().ok('test', str(slist[0][selecturl])) # siteslist = getsiteslist() # if select == -1: # return None # break # else: # return menuItems[select] # strmList = importsite(url, 'getstreams') surl = slist[0][selecturl] showsList = importsite(surl, 'getsearch', title=qry) for show in showsList: thumb = show.get('thumbnail') if thumb == None: thumb = "" if show.get('title') != u"Next": plugintools.add_item(title=show.get('title'), action='streamslist', url=show.get('url'), thumbnail=thumb) else: plugintools.add_item(title=show.get('title'), action='showmovie', url=show.get('url'), thumbnail=thumb) plugintools.close_item_list()
def get_searchstreams(title, thumbnail): dialog = xbmcgui.DialogProgress() dialog.create('ค้นหา', ("Loading items")) ntitle = title[0:title.find('(') - 1].replace(' ', '+') ntitle = re.sub('[^a-zA-Z0-9 +]', '', ntitle) #.encode('utf8','ignore') siteslist = getsiteslist() num_urls = len(siteslist) for index, site in enumerate(siteslist, 1): if dialog.iscanceled(): break percent = ((index + 1) * 100) / num_urls dialog.update(percent, ("processing lists"), ("%s") % (site.get('title'))) url = site.get('url') webgenre = site.get('genre') # check series web if webgenre != 'series': strmList = importsite(url, 'getsearchall', title=ntitle) else: strmList = None # xbmcgui.Dialog().ok('searchall',str(strmList)) if strmList != None: for stream in strmList: plugintools.add_item(title=stream.get('title'), action='stream', url=stream.get('url'), thumbnail=thumbnail) plugintools.close_item_list()
def get_seriesgenre(url): catgList = importsite(url, 'getgenre') for ctg in catgList: plugintools.add_item(title=ctg.get('title'), action='showseries', url=ctg.get('url')) plugintools.close_item_list()
def get_streams(url, thumbnail): # xbmcgui.Dialog().ok('url', thumbnail) # arg(title) strmList = importsite(url, 'getstreams') for stream in strmList: plugintools.add_item( title=stream.get('title'), action='stream', url=stream.get('url'), thumbnail=urllib.unquote(thumbnail).decode('utf8')) plugintools.close_item_list()
def get_episode(url, title, thumnail): savelast(url, title, thumnail, action='showepisode') epList = importsite(url, youget='getepisode') for show in epList: # print show thumb = show.get('thumbnail') if thumb == None: thumb = "" plugintools.add_item(title=show.get('title'), action='streamslist', url=show.get('url'), thumbnail=thumb) plugintools.close_item_list()
def get_movsearch(url): movsList = importsite(url, 'getmov') for show in movsList: # print show thumb = show.get('thumbnail') if thumb == None: thumb = "" if show.get('title') != u"Next": plugintools.add_item(title=show.get('title'), action='searchstreamslist', url=show.get('url'), thumbnail=thumb) else: plugintools.add_item(title=show.get('title'), action='showsearchmovie', url=show.get('url'), thumbnail=nextimg) plugintools.close_item_list()
def get_series(url): # xbmcgui.Dialog().ok('url',url) movsList = importsite(url, youget='getseries') for show in movsList: # print show thumb = show.get('thumbnail') if thumb == None: thumb = "" if show.get('title') != u"Next": plugintools.add_item(title=show.get('title'), action='showepisode', url=show.get('url'), thumbnail=thumb) else: plugintools.add_item(title=show.get('title'), action='showseries', url=show.get('url'), thumbnail=nextimg) plugintools.close_item_list()
def get_mov(url): # xbmcgui.Dialog().ok('url',url) movsList = importsite(url, 'getmov') for show in movsList: # print show thumb = show.get('thumbnail') if thumb == None: thumb = "" if show.get('title') != u"Next": plugintools.add_item(title=show.get('title'), action='streamslist', url=show.get('url'), thumbnail=thumb) else: plugintools.add_item(title=show.get('title'), action='showmovie', url=show.get('url'), thumbnail=thumb) plugintools.close_item_list()
def get_mov(url): # xbmcgui.Dialog().ok('url',url) movsList = importsite(url, 'getmov') for show in movsList: # print show thumb = show.get('thumbnail') if thumb == None: thumb = "" if show.get('title') != u"Next": plugintools.add_item(title=show.get('title'), action='streamslist', url=show.get('url'), thumbnail=thumb) else: plugintools.add_item(title=show.get('title'), action='showmovie', url=show.get('url'), thumbnail=nextimg) # xbmc.executebuiltin('Container.SetViewMode(500)') plugintools.close_item_list()
def get_streams(url, thumbnail, title): savelast(url=url, title=title, thumbnail=thumbnail, action='streamslist') # xbmcgui.Dialog().ok('get_stream', title) # arg(title) strmList = importsite(url, 'getstreams', title=title) for stream in strmList: stitle = title.decode('utf8') + ' ' + stream.get('title') if 'sources' in stream.get('url'): plugintools.add_item( title=stitle, action='qualitylist', url=stream.get('url'), thumbnail=urllib.unquote(thumbnail).decode('utf8')) else: plugintools.add_item( title=stitle, action='stream', url=stream.get('url'), thumbnail=urllib.unquote(thumbnail).decode('utf8')) plugintools.close_item_list()