def addTvShowsByLetter(paramDict): ''' This methods create the list of shows starting with letter ''' showList = request.showsWithLetterReq(paramDict['letter']) # Add the list of shows starting with the letter chosen for elem in showList: xbmcWrapper.addFolder(pluginId,2,elem.get('title'),{'title': elem.get('title'), 'image': elem.get('image'), 'linkDemand': elem.get('linkDemand')}) xbmcWrapper.endOfContent(pluginId)
def addTvShowsCategoryEpisodes(paramDict): ''' This methods create the list of video available for the previously chosen show and category ''' episodeList = request.showsEpisodeList(paramDict['contentSet-Id'], int(paramDict['page'])) # Add the list of video for the specified category for elem in episodeList['list']: video = elem.get('h264') if video == None or len(video) < 1: video = elem.get('wmv') if video == None or len(video) < 1: video = elem.get('mediaUri') if video: xbmcWrapper.addVideoItemWithMode( pluginId, 5, elem.get('name'), video, 'http://www.rai.tv/' + elem.get('image'), 'http://www.rai.tv/' + str(elem.get('image_medium'))) # Hanlde the next page indicator if int(paramDict['page']) + 1 < int(episodeList['pages']): xbmcWrapper.addFolder( pluginId, 4, 'Prossima Pagina', { 'title': paramDict['title'], 'contentSet-Id': paramDict['contentSet-Id'], 'page': str(int(paramDict['page']) + 1) }) xbmcWrapper.endOfContent(pluginId)
def addTvShowsCategories(paramDict): ''' This methods create the list of shows video categories ''' # LinkDemand is an URL that contains category list of the specific tv show url = paramDict['linkDemand'] categoryList = request.showVideoCategories(url) #Add the list of categories for the chosen show for elem in categoryList: xbmcWrapper.addFolder(pluginId,3,elem[1],{'title': paramDict['title'], 'categoryName': elem[1], 'contentSet-Id': elem[0], 'page': str(0)}) xbmcWrapper.endOfContent(pluginId)
def addTvShowsCategories(paramDict): ''' This methods create the list of shows video categories ''' # LinkDemand is an URL that passed as a parameter form the command line and had been escaped so need to be recovered url = urllib.unquote_plus(paramDict['linkDemand']) categoryList = request.showVideoCategories(url) #Add the list of categories for the chosen show for elem in categoryList: xbmcWrapper.addFolder(pluginId,3,elem[1],{'title': paramDict['title'], 'categoryName': elem[1], 'contentSet-Id': elem[0], 'page': str(0)}) xbmcWrapper.endOfContent(pluginId)
def addLetterIndex(): ''' This method creates the list of initial letter of all shows ''' global pluginId, base_url letterList = request.letterIndexReq() # Add a list of letter for letter in letterList: xbmcWrapper.addFolder(pluginId, 1, letter, {'letter': letter}) xbmcWrapper.endOfContent(pluginId)
def addLetterIndex(): ''' This method creates the list of initial letter of all shows ''' global pluginId,base_url letterList = request.letterIndexReq() # Add a list of letter for letter in letterList: xbmcWrapper.addFolder(pluginId,1,letter,{'letter': letter}) xbmcWrapper.endOfContent(pluginId)
def addTvShowsByLetter(paramDict): ''' This methods create the list of shows starting with letter ''' showList = request.showsWithLetterReq(paramDict['letter']) # Add the list of shows starting with the letter chosen for elem in showList: xbmcWrapper.addFolder( pluginId, 2, elem.get('title'), { 'title': elem.get('title'), 'image': elem.get('image'), 'linkDemand': elem.get('linkDemand') }) xbmcWrapper.endOfContent(pluginId)
def addTvShowsCategories(paramDict): ''' This methods create the list of shows video categories ''' # LinkDemand is an URL that contains category list of the specific tv show url = paramDict['linkDemand'] categoryList = request.showVideoCategories(url) #Add the list of categories for the chosen show for elem in categoryList: xbmcWrapper.addFolder( pluginId, 3, elem[1], { 'title': paramDict['title'], 'categoryName': elem[1], 'contentSet-Id': elem[0], 'page': str(0) }) xbmcWrapper.endOfContent(pluginId)
def addTvShowsCategoryEpisodes(paramDict): ''' This methods create the list of video available for the previously chosen show and category ''' episodeList = request.showsEpisodeList(paramDict['contentSet-Id'], int(paramDict['page'])) # Add the list of video for the specified category for elem in episodeList['list']: video = elem.get('h264') if video == None or len(video) < 1: video = elem.get('wmv') if video == None or len(video) < 1: video = elem.get('mediaUri') if video: xbmcWrapper.addVideoItemWithMode(pluginId, 5, elem.get('name'), video, 'http://www.rai.tv/'+elem.get('image'), 'http://www.rai.tv/'+str(elem.get('image_medium'))) # Hanlde the next page indicator if int(paramDict['page'])+1 < int(episodeList['pages']): xbmcWrapper.addFolder(pluginId,4,'Prossima Pagina',{'title': paramDict['title'], 'contentSet-Id': paramDict['contentSet-Id'], 'page': str(int(paramDict['page'])+1)}) xbmcWrapper.endOfContent(pluginId)