def prepareVideoItem(request_obj, response_obj): item = ListItem() item.add_moving_data('videoUrl', request_obj.get_data()['videoLink']) item.set_next_action_name('Play') xbmcListItem = xbmcgui.ListItem(label=request_obj.get_data()['videoTitle']) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def playChannel(request_obj, response_obj): item = ListItem() item.set_next_action_name('Play') item.add_moving_data('videoStreamUrl', request_obj.get_data()['channelUrl']) xbmcListItem = xbmcgui.ListItem(label=request_obj.get_data()['channelName'], iconImage=request_obj.get_data()['channelLogo'], thumbnailImage=request_obj.get_data()['channelLogo']) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def __preparePlayListItem__(video_items, source): video_playlist_items = [] video_source_img = None video_source_name = None for item in video_items: video_item = {} video_item['videoLink'] = item.get_request_data()['videoLink'] video_item['videoTitle'] = item.get_request_data()['videoTitle'] video_playlist_items.append(video_item) video_source_img = item.get_moving_data()['videoSourceImg'] video_source_name = item.get_moving_data()['videoSourceName'] Logger.logDebug('IMAGE :: ') Logger.logDebug(video_source_img) Logger.logDebug(type(video_source_img)) item = ListItem() item.add_request_data('videoPlayListItems', video_playlist_items) item.add_moving_data('isContinuousPlayItem', True) item.add_moving_data('videoSourceName', video_source_name) item.set_next_action_name('Play_AllStreams') xbmcListItem = xbmcgui.ListItem( label='[COLOR blue]' + AddonUtils.getBoldString('Continuous Play') + '[/COLOR]' + ' | ' + 'Source #' + source + ' | ' + 'Parts = ' + str(len(video_playlist_items)), iconImage=video_source_img, thumbnailImage=video_source_img) item.set_xbmc_list_item_obj(xbmcListItem) return item
def __preparePlayListItem__(video_source_id, video_source_img, video_playlist_items): item = ListItem() item.add_request_data('videoPlayListItems', video_playlist_items) item.set_next_action_name('SnapAndDirectPlayList') item.add_moving_data('isContinuousPlayItem', True) xbmcListItem = xbmcgui.ListItem(label='[COLOR blue]' + AddonUtils.getBoldString('Continuous Play') + '[/COLOR]' + ' | ' + 'Source #' + str(video_source_id) + ' | ' + 'Parts = ' + str(len(video_playlist_items)) , iconImage=video_source_img, thumbnailImage=video_source_img) item.set_xbmc_list_item_obj(xbmcListItem) return item
def prepareVideoItem(request_obj, response_obj): item = ListItem() item.add_moving_data('videoUrl', request_obj.get_data()['videoLink']) item.set_next_action_name('Play') xbmcListItem = xbmcgui.ListItem(label=request_obj.get_data()['videoTitle']) if(request_obj.get_data().has_key('videoInfo')): meta = request_obj.get_data()['videoInfo'] xbmcListItem.setIconImage(meta['thumb_url']) xbmcListItem.setThumbnailImage(meta['cover_url']) xbmcListItem.setInfo('video', meta) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def __processPlaylistAndAddVideoItem__(item): playlist = findPlaylistInfo(item.get_moving_data()['videoUrl']) if playlist is not None: videoItems = [] part = 0 for videoUrl in playlist: part = part + 1 item = ListItem() item.add_moving_data('videoUrl', videoUrl) item.set_next_action_name('Play') xbmcListItem = xbmcgui.ListItem(label='Video ' + str(part)) item.set_xbmc_list_item_obj(xbmcListItem) videoItems.append(item) return videoItems
def retrieveLiveLink(request_obj, response_obj): channelInfo = request_obj.get_data()['channelInfo'] params = {'channel_id':channelInfo[0], 'server_type':channelInfo[1], 'timezone':channelInfo[2]} content = HttpClient().getHtmlContent(url='http://www.watchsuntv.com/play/pages/playOn/', params=params) streamUrl = re.compile('<param name="flashvars" value="streamer=(.+?)"').findall(content)[0] swfUrl = 'http://www.watchsuntv.com/play/' + re.compile('<param name="movie" value="(.+?)"').findall(content)[0] urlParams = streamUrl.split('&') videoStreamUrl = urlParams[0] + ' ' + urlParams[1].replace('file', 'playpath') + ' swfUrl=' + swfUrl + ' swfVfy=true live=true pageUrl=' + swfUrl item = ListItem() item.set_next_action_name('Play') item.add_moving_data('videoStreamUrl', videoStreamUrl) xbmcListItem = xbmcgui.ListItem(label=request_obj.get_data()['channelName'], iconImage=request_obj.get_data()['channelLogo'], thumbnailImage=request_obj.get_data()['channelLogo']) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def retrieveLiveLink(request_obj, response_obj): videoStreamUrl = None channelName = request_obj.get_data()['channelId'] if request_obj.get_data()['flash']: videoStreamUrl = retrieveFlashLiveLink(request_obj, response_obj) channelName = channelName + ' Flash HQ' else: videoStreamUrl = retrieveMMSLiveLink(request_obj, response_obj) item = ListItem() item.set_next_action_name('Play') item.add_moving_data('videoStreamUrl', videoStreamUrl) xbmcListItem = xbmcgui.ListItem(label=channelName, iconImage=request_obj.get_data()['channelLogo'], thumbnailImage=request_obj.get_data()['channelLogo']) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def preparePlayListItems(request_obj, response_obj): if request_obj.get_data().has_key('videoPlayListItems'): playList = request_obj.get_data()['videoPlayListItems'] for videoItem in playList: data = {} data['videoLink'] = videoItem['videoLink'] data['videoTitle'] = videoItem['videoTitle'] item = ListItem() item.add_moving_data('videoStreamUrl', 'plugin://plugin.video.filmibynaturex/?actionId=snap_and_resolve_video&data=' + urllib.quote_plus(AddonUtils.encodeData(data))) item.set_next_action_name('Play') xbmcListItem = xbmcgui.ListItem(label=videoItem['videoTitle']) if(request_obj.get_data().has_key('videoInfo')): meta = request_obj.get_data()['videoInfo'] xbmcListItem.setIconImage(meta['thumb_url']) xbmcListItem.setThumbnailImage(meta['cover_url']) xbmcListItem.setInfo('video', meta) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def preparePlayListItems(request_obj, response_obj): if request_obj.get_data().has_key('videoPlayListItems'): playList = request_obj.get_data()['videoPlayListItems'] for videoItem in playList: data = {} data['videoLink'] = videoItem['videoLink'] data['videoTitle'] = videoItem['videoTitle'] item = ListItem() item.add_moving_data( 'videoStreamUrl', 'plugin://plugin.video.filmibynaturex/?actionId=snap_and_resolve_video&data=' + urllib.quote_plus(AddonUtils.encodeData(data))) item.set_next_action_name('Play') xbmcListItem = xbmcgui.ListItem(label=videoItem['videoTitle']) if (request_obj.get_data().has_key('videoInfo')): meta = request_obj.get_data()['videoInfo'] xbmcListItem.setIconImage(meta['thumb_url']) xbmcListItem.setThumbnailImage(meta['cover_url']) xbmcListItem.setInfo('video', meta) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def __preparePlayListItem__(video_items, source): video_playlist_items = [] video_source_img = None video_source_name = None for item in video_items: video_item = {} video_item['videoLink'] = item.get_request_data()['videoLink'] video_item['videoTitle'] = item.get_request_data()['videoTitle'] video_playlist_items.append(video_item) video_source_img = item.get_moving_data()['videoSourceImg'] video_source_name = item.get_moving_data()['videoSourceName'] Logger.logDebug('IMAGE :: ') Logger.logDebug(video_source_img) Logger.logDebug(type(video_source_img)) item = ListItem() item.add_request_data('videoPlayListItems', video_playlist_items) item.add_moving_data('isContinuousPlayItem', True) item.add_moving_data('videoSourceName', video_source_name) item.set_next_action_name('Play_AllStreams') xbmcListItem = xbmcgui.ListItem(label='[COLOR blue]' + AddonUtils.getBoldString('Continuous Play') + '[/COLOR]' + ' | ' + 'Source #' + source + ' | ' + 'Parts = ' + str(len(video_playlist_items)) , iconImage=video_source_img, thumbnailImage=video_source_img) item.set_xbmc_list_item_obj(xbmcListItem) return item
def __retrieveTVShowEpisodes__(threads, response_obj): if threads is None: return aTags = threads.findAll('a', {'class':re.compile(r'\btitle\b')}) videoEpisodes = [] for aTag in aTags: episodeName = aTag.getText() if not re.search(r'\b(Watch|Episode|Video|Promo)\b', episodeName, re.IGNORECASE): pass else: videoEpisodes.append(aTag) if len(videoEpisodes) == 0: videoEpisodes = aTags for aTag in videoEpisodes: episodeName = aTag.getText() item = ListItem() titleInfo = HttpUtils.unescape(episodeName) movieInfo = re.compile("(.+?)\((\d+)\)").findall(titleInfo) if(len(movieInfo) >= 1 and len(movieInfo[0]) >= 2): title = unicode(movieInfo[0][0].rstrip()).encode('utf-8') year = unicode(movieInfo[0][1]).encode('utf-8') item.add_moving_data('movieTitle', title) item.add_moving_data('movieYear', year) item.add_request_data('episodeName', titleInfo) episodeUrl = str(aTag['href']) if not episodeUrl.lower().startswith(BASE_WSITE_URL): if episodeUrl[0] != '/': episodeUrl = '/' + episodeUrl episodeUrl = BASE_WSITE_URL + episodeUrl item.add_request_data('episodeUrl', episodeUrl) item.set_next_action_name('Episode_VLinks') xbmcListItem = xbmcgui.ListItem(label=episodeName) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item)
def listMovies(request_obj, response_obj): categoryUrlSuffix = request_obj.get_data()['categoryUrlSuffix'] page = 1 if request_obj.get_data().has_key('page'): page = int(request_obj.get_data()['page']) titles = retrieveMovies(categoryUrlSuffix, page) items = [] for entry in titles: titleInfo = entry['title'] if re.compile('Hindi Dubbed').findall(titleInfo) is not None: titleInfo = titleInfo.replace('(Hindi Dubbed)', '').replace('Hindi Dubbed', '') movieInfo = re.compile("(.+?)\((\d+)\) (.*)").findall(titleInfo) if(len(movieInfo) == 0): movieInfo = re.compile("(.+?)\((\d+)\)").findall(titleInfo) if(len(movieInfo) == 0): movieInfo = [[titleInfo]] title = unicode(movieInfo[0][0].rstrip()).encode('utf-8').replace('–', '-').replace('&', '&') year = '' if(len(movieInfo[0]) >= 2): year = unicode(movieInfo[0][1]).encode('utf-8') quality = '' if categoryUrlSuffix != 'BluRay': if(len(movieInfo[0]) >= 3): quality = unicode(movieInfo[0][2]).encode('utf-8').strip() if quality == '*BluRay*' or quality == '*BluRay* (Hindi Dubbed)' or quality == '*BluRay* Hindi Dubbed': quality = '[COLOR red]*HD*[/COLOR]' elif quality == 'DVD' or quality == 'DVD (Hindi Dubbed)' or quality == 'DVD Hindi Dubbed': quality = '[COLOR orange]DVD[/COLOR]' quality = ' :: ' + quality movieInfo = entry['content'] movieLabel = '[B]' + title + '[/B]' + ('(' + year + ')' + quality if (year != '') else '') item = ListItem() item.add_moving_data('movieTitle', title) item.add_moving_data('movieYear', year) item.add_request_data('movieInfo', unicode(movieInfo).encode('utf-8')) item.add_request_data('movieTitle', title) item.set_next_action_name('Movie_Streams') xbmcListItem = xbmcgui.ListItem(label=movieLabel, label2='(' + year + ') :: ' + quality) item.set_xbmc_list_item_obj(xbmcListItem) items.append(item) response_obj.addListItem(item) total_pages = 4 count = 0 next_page = page if count < total_pages: count = count + 1 next_page = next_page + 1 item = ListItem() item.add_request_data('page', next_page) item.add_request_data('categoryUrlSuffix', request_obj.get_data()['categoryUrlSuffix']) item.set_next_action_name('Next_Page') xbmcListItem = xbmcgui.ListItem(label=' ---- NEXT PAGE #' + str(next_page) + ' --->') item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item) response_obj.set_xbmc_content_type('movies')
def __prepareVideoLink__(videoSourceLink): new_items = [] url = videoSourceLink if re.search('wp.me', url, re.I): url = HttpUtils.getRedirectedUrl(url) if not url.startswith('http://'): url = 'http://' + url Logger.logDebug(url) # contentDiv = BeautifulSoup.SoupStrainer('div', {'class':'left_articles'}) # soup = BeautifulSoup.BeautifulSoup(html, contentDiv) html = HttpUtils.HttpClient().getHtmlContent(url) dek = EnkDekoder.dekode(html) Logger.logDebug(dek) if dek is not None: html = dek html = html.replace('\n\r', '').replace('\r', '').replace('\n', '').replace('\\', '') children = [] if re.search('http://videos.stvflicks.com/', html): docId = re.compile('http://videos.stvflicks.com/(.+?).mp4"').findall(html)[0] children.append('src="http://videos.stvflicks.com/' + docId + '.mp4"') elif re.search('http://playcineflix.com/', html): docId = re.compile('http://playcineflix.com/(.+?).mp4"').findall(html)[0] children.append('src="http://playcineflix.com/' + docId + '.mp4"') elif re.search('https://video.google.com/get_player', html): docId = re.compile('docid=(.+?)"').findall(html)[0] children.append('src="https://docs.google.com/file/d/' + docId + '/preview"') elif re.search('http://videos.videopress.com/', html): docId = re.compile('type="video/mp4" href="http://videos.videopress.com/(.+?).mp4"').findall(html)[0] children.append('src="http://videos.videopress.com/' + docId + '.mp4"') else: children = re.compile('<embed(.+?)>').findall(html) if children is None or len(children) == 0: children = re.compile('<iframe(.+?)>').findall(html) Logger.logDebug(children) for child in children: video_url = re.compile('src="(.+?)"').findall(child)[0] if(re.search('http://ads', video_url, re.I) or re.search('http://ax-d', video_url, re.I)): continue if video_url.startswith('http://goo.gl/'): Logger.logDebug('Found google short URL = ' + video_url) video_url = HttpUtils.getRedirectedUrl(video_url) Logger.logDebug('After finding out redirected URL = ' + video_url) if re.search('videos.desionlinetheater.com', video_url): XBMCInterfaceUtils.displayDialogMessage('Unable to parse', 'A new HTML Guardian is used to protect the page', 'Sounds technical!! hmm, it means cannot find video.', 'Fix: Find me JavaScript Interpreter online service') video_hosting_info = SnapVideo.findVideoHostingInfo(video_url) if video_hosting_info is None: Logger.logDebug('Unrecognized video_url = ' + video_url) continue video_source_img = video_hosting_info.get_video_hosting_image() new_item = ListItem() new_item.add_request_data('videoTitle', 'Part #') new_item.add_request_data('videoLink', video_url) new_item.add_moving_data('videoSourceImg', video_source_img) new_item.add_moving_data('videoSourceName', video_hosting_info.get_video_hosting_name()) new_item.set_next_action_name('Play_Stream') xbmcListItem = xbmcgui.ListItem(label='Part #', iconImage=video_source_img, thumbnailImage=video_source_img) new_item.set_xbmc_list_item_obj(xbmcListItem) new_items.append(new_item) return new_items
def listMovies(request_obj, response_obj): categoryUrlSuffix = request_obj.get_data()['categoryUrlSuffix'] page = 1 if request_obj.get_data().has_key('page'): page = int(request_obj.get_data()['page']) titles = retrieveMovies(categoryUrlSuffix, page) items = [] for entry in titles: titleInfo = entry['title'] if re.compile('Hindi Dubbed').findall(titleInfo) is not None: titleInfo = titleInfo.replace('(Hindi Dubbed)', '').replace('Hindi Dubbed', '') movieInfo = re.compile("(.+?)\((\d+)\) (.*)").findall(titleInfo) if (len(movieInfo) == 0): movieInfo = re.compile("(.+?)\((\d+)\)").findall(titleInfo) if (len(movieInfo) == 0): movieInfo = [[titleInfo]] title = unicode(movieInfo[0][0].rstrip()).encode('utf-8').replace( '–', '-').replace('&', '&') year = '' if (len(movieInfo[0]) >= 2): year = unicode(movieInfo[0][1]).encode('utf-8') quality = '' if categoryUrlSuffix != 'BluRay': if (len(movieInfo[0]) >= 3): quality = unicode(movieInfo[0][2]).encode('utf-8').strip() if quality == '*BluRay*' or quality == '*BluRay* (Hindi Dubbed)' or quality == '*BluRay* Hindi Dubbed': quality = '[COLOR red]*HD*[/COLOR]' elif quality == 'DVD' or quality == 'DVD (Hindi Dubbed)' or quality == 'DVD Hindi Dubbed': quality = '[COLOR orange]DVD[/COLOR]' quality = ' :: ' + quality movieInfo = entry['content'] movieLabel = '[B]' + title + '[/B]' + ('(' + year + ')' + quality if (year != '') else '') item = ListItem() item.add_moving_data('movieTitle', title) item.add_moving_data('movieYear', year) item.add_request_data('movieInfo', unicode(movieInfo).encode('utf-8')) item.add_request_data('movieTitle', title) item.set_next_action_name('Movie_Streams') xbmcListItem = xbmcgui.ListItem(label=movieLabel, label2='(' + year + ') :: ' + quality) item.set_xbmc_list_item_obj(xbmcListItem) items.append(item) response_obj.addListItem(item) total_pages = 4 count = 0 next_page = page if count < total_pages: count = count + 1 next_page = next_page + 1 item = ListItem() item.add_request_data('page', next_page) item.add_request_data('categoryUrlSuffix', request_obj.get_data()['categoryUrlSuffix']) item.set_next_action_name('Next_Page') xbmcListItem = xbmcgui.ListItem(label=' ---- NEXT PAGE #' + str(next_page) + ' --->') item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item) response_obj.set_xbmc_content_type('movies')
def __prepareVideoLink__(videoSourceLink): new_items = [] url = videoSourceLink if re.search('wp.me', url, re.I): url = HttpUtils.getRedirectedUrl(url) if not url.startswith('http://'): url = 'http://' + url Logger.logDebug(url) # contentDiv = BeautifulSoup.SoupStrainer('div', {'class':'left_articles'}) # soup = BeautifulSoup.BeautifulSoup(html, contentDiv) if re.search('', videoSourceLink): video_hosting_info = SnapVideo.findVideoHostingInfo(videoSourceLink) if video_hosting_info is None: Logger.logDebug('Unrecognized video_url = ' + videoSourceLink) else: video_source_img = video_hosting_info.get_video_hosting_image() new_item = ListItem() new_item.add_request_data('videoTitle', 'Part #') new_item.add_request_data('videoLink', videoSourceLink) new_item.add_moving_data('videoSourceImg', video_source_img) new_item.add_moving_data( 'videoSourceName', video_hosting_info.get_video_hosting_name()) new_item.set_next_action_name('Play_Stream') xbmcListItem = xbmcgui.ListItem(label='Part #', iconImage=video_source_img, thumbnailImage=video_source_img) new_item.set_xbmc_list_item_obj(xbmcListItem) new_items.append(new_item) return new_items html = HttpUtils.HttpClient().getHtmlContent(url) dek = EnkDekoder.dekode(html) Logger.logDebug(dek) if dek is not None: html = dek html = html.replace('\n\r', '').replace('\r', '').replace('\n', '').replace('\\', '') children = [] if re.search('http://videos.stvflicks.com/', html): docId = re.compile('http://videos.stvflicks.com/(.+?).mp4"').findall( html)[0] children.append('src="http://videos.stvflicks.com/' + docId + '.mp4"') elif re.search('http://playcineflix.com/', html): docId = re.compile('http://playcineflix.com/(.+?).mp4"').findall( html)[0] children.append('src="http://playcineflix.com/' + docId + '.mp4"') elif re.search('https://video.google.com/get_player', html): docId = re.compile('docid=(.+?)"').findall(html)[0] children.append('src="https://docs.google.com/file/d/' + docId + '/preview"') elif re.search('http://videos.videopress.com/', html): docId = re.compile( 'type="video/mp4" href="http://videos.videopress.com/(.+?).mp4"' ).findall(html)[0] children.append('src="http://videos.videopress.com/' + docId + '.mp4"') elif re.search('http://videos.videopress.com/', html): docId = re.compile( 'type="video/mp4" href="http://videos.videopress.com/(.+?).mp4"' ).findall(html)[0] children.append('src="http://videos.videopress.com/' + docId + '.mp4"') elif re.search('video_alt_url=http://www.mediaplaybox.com', html): docId = re.compile('video_alt_url=http://www.mediaplaybox.com(.+?).mp4' ).findall(html)[0] children.append('src="http://www.mediaplaybox.com:81/' + docId + '.mp4"') elif re.search('video_url=http://www.mediaplaybox.com', html): docId = re.compile( 'video_url=http://www.mediaplaybox.com(.+?).mp4').findall(html)[0] children.append('src="http://www.mediaplaybox.com:81/' + docId + '.mp4"') else: children = re.compile('<embed(.+?)>').findall(html) if children is None or len(children) == 0: children = re.compile('<iframe(.+?)>').findall(html) Logger.logDebug(children) for child in children: video_url = re.compile('src="(.+?)"').findall(child)[0] if (re.search('http://ads', video_url, re.I) or re.search('http://ax-d', video_url, re.I)): continue if video_url.startswith('http://goo.gl/'): Logger.logDebug('Found google short URL = ' + video_url) video_url = HttpUtils.getRedirectedUrl(video_url) Logger.logDebug('After finding out redirected URL = ' + video_url) if re.search('videos.desionlinetheater.com', video_url): XBMCInterfaceUtils.displayDialogMessage( 'Unable to parse', 'A new HTML Guardian is used to protect the page', 'Sounds technical!! hmm, it means cannot find video.', 'Fix: Find me JavaScript Interpreter online service') video_hosting_info = SnapVideo.findVideoHostingInfo(video_url) if video_hosting_info is None: Logger.logDebug('Unrecognized video_url = ' + video_url) continue video_source_img = video_hosting_info.get_video_hosting_image() new_item = ListItem() new_item.add_request_data('videoTitle', 'Part #') new_item.add_request_data('videoLink', video_url) new_item.add_moving_data('videoSourceImg', video_source_img) new_item.add_moving_data('videoSourceName', video_hosting_info.get_video_hosting_name()) new_item.set_next_action_name('Play_Stream') xbmcListItem = xbmcgui.ListItem(label='Part #', iconImage=video_source_img, thumbnailImage=video_source_img) new_item.set_xbmc_list_item_obj(xbmcListItem) new_items.append(new_item) return new_items
def listMovies(request_obj, response_obj): categoryUrlSuffix = request_obj.get_data()['categoryUrlSuffix'] page = None if request_obj.get_data().has_key('page'): page = int(request_obj.get_data()['page']) titles = Container().getAddonContext().cache.cacheFunction(retrieveMovies, categoryUrlSuffix) count = -1 start = 0 current_page = -1 total_pages = -1 if len(titles) > TITLES_PER_PAGE: count = 0 current_page = 1 total_pages = int(len(titles) / TITLES_PER_PAGE) if len(titles) % TITLES_PER_PAGE: total_pages = total_pages + 1 if page is not None: current_page = int(page) start = (current_page - 1) * TITLES_PER_PAGE end = start + TITLES_PER_PAGE items = [] for entry in titles: if count > -1: if count < start: count = count + 1 continue elif count >= end: break else: count = count + 1 titleInfo = entry['info'] year = '' movieInfoUrl = entry['link'] movieLabel = '[B]' + titleInfo + '[/B]' + ('(' + year + ')' + quality if (year != '') else '') item = ListItem() item.add_moving_data('movieTitle', titleInfo) item.add_moving_data('movieYear', year) item.add_request_data('movieTitle', titleInfo) item.add_request_data('movieInfoUrl', movieInfoUrl) item.set_next_action_name('Movie_Streams') xbmcListItem = xbmcgui.ListItem(label=movieLabel, label2='(' + year + ')') item.set_xbmc_list_item_obj(xbmcListItem) items.append(item) response_obj.addListItem(item) if current_page > 0 and current_page < total_pages: next_page = current_page + 1 item = ListItem() item.add_request_data('page', next_page) item.add_request_data('categoryUrlSuffix', request_obj.get_data()['categoryUrlSuffix']) item.set_next_action_name('Next_Page') xbmcListItem = xbmcgui.ListItem(label=' ---- next page ---- #' + str(next_page) + ' ->') item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item) response_obj.set_xbmc_content_type('movies')