def prepareVideoLinkForPlayable(request_obj, response_obj): items = response_obj.get_item_list() playable_items = [] for item in items: if item.get_next_action_name() == 'Play': playable_items.append(item) if len(playable_items) > 0: XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__prepareVideoLink__'), playable_items, 'Preparing video link', 'Failed to retrieve video information, please try again later')
def addVideoInfoInPlayableItems(request_obj, response_obj): items = response_obj.get_item_list() playable_items = [] for item in items: if item.get_next_action_name() == 'Play': playable_items.append(item) try: XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addVideoInfo_in_item'), playable_items, 'Retrieving video info', failure_message=None) except Exception, e: Logger.logFatal(e)
def addEmbeddedVideoInfoInPlayableItems(request_obj, response_obj): items = response_obj.get_item_list() playable_items = [] for item in items: if item.get_next_action_name() == 'Play': playable_items.append(item) try: XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addEmbeddedVideoInfo_in_item__'), playable_items, 'Retrieving video info', 'Failed to retrieve video information, please try again later') except Exception, e: Logger.logFatal(e)
def displayChannels(request_obj, response_obj): content = BeautifulSoup.SoupStrainer('div', {'class':re.compile(r'\bchannels\b')}) soup = HttpClient().getBeautifulSoup(url='http://www.watchsuntv.com/play', parseOnlyThese=content) channels = soup.findAll('li', {'class':'channel-info'}) list_items = XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__displayChannels__'), channels, 'Preparing channel items', 'Failed to retrieve channel information, please try again later') response_obj.extendItemList(list_items) response_obj.set_xbmc_sort_method(xbmcplugin.SORT_METHOD_LABEL)
def displayRecentMovies(request_obj, response_obj): contentDiv = BeautifulSoup.SoupStrainer('div', {'id':'sub-sidebar'}) soup = HttpClient().getBeautifulSoup(url='http://www.pinoymovie.co/', parseOnlyThese=contentDiv) soup = soup.findChild('div', {'class':'right'}) movieLinkTags = soup.findChildren('a') recentMoviesItems = XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__retrieveRecentMovies__'), movieLinkTags, 'Retrieving recent movies and its information', 'Failed to retrieve video information, please try again later', line1='Takes about 5 minutes') response_obj.extendItemList(recentMoviesItems)
def displayRecentMovies(request_obj, response_obj): contentDiv = BeautifulSoup.SoupStrainer("div", {"id": "sub-sidebar"}) soup = HttpClient().getBeautifulSoup(url="http://www.pinoymovie.co/", parseOnlyThese=contentDiv) soup = soup.findChild("div", {"class": "right"}) movieLinkTags = soup.findChildren("a") recentMoviesItems = XBMCInterfaceUtils.callBackDialogProgressBar( getattr(sys.modules[__name__], "__retrieveRecentMovies__"), movieLinkTags, "Retrieving recent movies and its information", "Failed to retrieve video information, please try again later", line1="Takes about 5 minutes", ) response_obj.extendItemList(recentMoviesItems)
def __prepareVideoSourceLinks__(videoSourceLinks, source): new_items = XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__prepareVideoLink__'), videoSourceLinks, 'Retrieving streaming links for source #' + source, 'Failed to retrieve stream information, please try again later') if len(new_items) == 0: XBMCInterfaceUtils.displayDialogMessage('No video items found!', 'Unable to resolve video items from source #' + source, 'Continuing with next source...') return [] count = 0 for item in new_items: xbmcItem = item.get_xbmc_list_item_obj() count = count + 1 xbmcItem.setLabel('Source #' + source + ' | ' + xbmcItem.getLabel() + str(count)) new_items.append(__preparePlayListItem__(new_items, source)) return new_items
def displayChannels(request_obj, response_obj): addonContext = Container().getAddonContext() item = ListItem() item.set_next_action_name('add_Channel') youtube_icon_filepath = AddonUtils.getCompleteFilePath(baseDirPath=addonContext.addonPath, extraDirPath=AddonUtils.ADDON_ART_FOLDER, filename='Add_New_YouTube_V1.png') xbmcListItem = xbmcgui.ListItem(label='Add New Channel', iconImage=youtube_icon_filepath, thumbnailImage=youtube_icon_filepath) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item) filepath = AddonUtils.getCompleteFilePath(baseDirPath=addonContext.addonProfile, extraDirPath=AddonUtils.ADDON_SRC_DATA_FOLDER, filename=CHANNELS_JSON_FILE, makeDirs=True) if not AddonUtils.doesFileExist(filepath): new_items = XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__retrieveYouTubeUserInfo__'), PRE_LOADED_CHANNELS, 'Loading default list of channels...', 'Remove the channel you hate in default list using context menu.') index = 0 channelsJsonObj = {} for username in PRE_LOADED_CHANNELS: channelsJsonObj[username] = new_items[index] index = index + 1 AddonUtils.saveObjToJsonFile(filepath, channelsJsonObj) try: channelsJsonObj = AddonUtils.getJsonFileObj(filepath) print 'CHANNELS JSON LOADED' if len(channelsJsonObj) == 0: d = xbmcgui.Dialog() if d.yesno('NO channels added yet!', 'Would you like to add YouTube channel right now?', 'Get username from YouTube URL.'): isAdded = addNewChannel(request_obj, response_obj) if not isAdded: return else: channelsJsonObj = AddonUtils.getJsonFileObj(filepath) for channelUsername in channelsJsonObj: userInfo = channelsJsonObj[channelUsername] item = ListItem() item.add_request_data('userId', channelUsername) item.set_next_action_name('show_Channel') xbmcListItem = xbmcgui.ListItem(label=unicode(userInfo['title']).encode("utf-8"), iconImage=userInfo['thumbnail'], thumbnailImage=userInfo['thumbnail']) contextMenuItems = [] data = '?actionId=' + urllib.quote_plus("remove_YouTube_Channel") + '&data=' + urllib.quote_plus(AddonUtils.encodeData({"userId":channelUsername})) contextMenuItems.append(('Remove channel', 'XBMC.RunPlugin(%s?%s)' % (sys.argv[0], data))) xbmcListItem.addContextMenuItems(contextMenuItems, replaceItems=False) item.set_xbmc_list_item_obj(xbmcListItem) response_obj.addListItem(item) except: raise AddonUtils.deleteFile(filepath) print 'MY CHANNELS CORRUPT FILE DELETED = ' + filepath
def __prepareVideoSourceLinks__(videoSourceLinks, source): new_items = XBMCInterfaceUtils.callBackDialogProgressBar( getattr(sys.modules[__name__], '__prepareVideoLink__'), videoSourceLinks, 'Retrieving streaming links for source #' + source, 'Failed to retrieve stream information, please try again later') if len(new_items) == 0: XBMCInterfaceUtils.displayDialogMessage( 'No video items found!', 'Unable to resolve video items from source #' + source, 'Continuing with next source...') return [] count = 0 for item in new_items: xbmcItem = item.get_xbmc_list_item_obj() count = count + 1 xbmcItem.setLabel('Source #' + source + ' | ' + xbmcItem.getLabel() + str(count)) new_items.append(__preparePlayListItem__(new_items, source)) return new_items
def addEmbeddedVideoInfo(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar( getattr(sys.modules[__name__], '__addEmbeddedVideoInfo_in_item__'), items, 'Retrieving video info', 'Failed to retrieve video information, please try again later')
def prepareVideoLink(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__prepareVideoLink__'), items, 'Preparing video link', 'Failed to retrieve video information, please try again later')
def addVideoInfo(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addVideoInfo_in_item'), items, 'Retrieving video info', 'Video is either removed or not available. Use other links.')
def retieveMovieInfoAndAddItem(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addMovieInfo_in_item'), items, 'Retrieving info', 'Failed to retrieve information, please try again later')
def retrieveTVShowsAndSave(request_obj, response_obj): oldfilepath = AddonUtils.getCompleteFilePath(baseDirPath=AddonContext().addonProfile, extraDirPath=AddonUtils.ADDON_SRC_DATA_FOLDER, filename=OLD_CHANNELS_JSON_FILE, makeDirs=True) AddonUtils.deleteFile(oldfilepath) filepath = AddonUtils.getCompleteFilePath(baseDirPath=AddonContext().addonProfile, extraDirPath=AddonUtils.ADDON_SRC_DATA_FOLDER, filename=CHANNELS_JSON_FILE, makeDirs=True) refresh = AddonContext().addon.getSetting('drForceRefresh') if refresh == None or refresh != 'true': lastModifiedTime = AddonUtils.getFileLastModifiedTime(filepath) if lastModifiedTime is not None: diff = long((time.time() - lastModifiedTime) / 3600) if diff < 720: return else: print CHANNELS_JSON_FILE + ' was last created 30 days ago, refreshing data.' else: print CHANNELS_JSON_FILE + ' request to force refresh data. ' tvChannels = {"UTV Stars": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/uu/utv_stars.jpg", "channelType": "IND", "running_tvshows_url": "/utv-stars/", "finished_tvshows_url": None}, "Star Plus": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_plus.jpg", "channelType": "IND", "running_tvshows_url": "/star-plus/", "finished_tvshows_url": "/star-plus-past-shows/"}, "Zee TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/zz/zee_tv.jpg", "channelType": "IND", "running_tvshows_url": "/zee-tv/", "finished_tvshows_url": "/zee-tv-past-shows/"}, "Sony TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/set_in.jpg", "channelType": "IND", "running_tvshows_url": "/sony-tv/", "finished_tvshows_url": "/sony-tv-past-shows/"}, "Star One": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_one.jpg", "channelType": "IND", "running_tvshows_url": "/star-one/", "finished_tvshows_url": "/star-one-past-shows/"}, "Life OK": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ll/life_ok_in.jpg", "channelType": "IND", "running_tvshows_url": "/life-ok/", "finished_tvshows_url": None}, "Star Jalsha": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_jalsha.jpg", "channelType": "IND", "running_tvshows_url": "/star-jalsha/", "finished_tvshows_url": "/star-jalsha-past-shows/"}, "Sahara One": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/sahara_one.jpg", "channelType": "IND", "running_tvshows_url": "/sahara-one/", "finished_tvshows_url": "/sahara-one-past-shows/"}, "Colors": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/cc/colors_in.jpg", "channelType": "IND", "running_tvshows_url": "/colors-channel/", "finished_tvshows_url": "/colors-past-shows/"}, "NDTV Imagine": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ii/imagine_tv_in.jpg", "channelType": "IND", "running_tvshows_url": "/ndtv-imagine/", "finished_tvshows_url": "/ndtv-past-shows/"}, "Sab TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/sony_sab_tv.jpg", "channelType": "IND", "running_tvshows_url": "/sab-tv/", "finished_tvshows_url": "/sab-tv-past-shows/"}, "MTV (India/Pakistan)": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/mm/mtv_india.jpg", "channelType": "IND", "running_tvshows_url": "/mtv-india-pakistan/", "finished_tvshows_url": "/mtv-india-pakistan-past-shows/"}, "Bindass TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/uu/utv_bindass.jpg", "channelType": "IND", "running_tvshows_url": "/bindass-tv/", "finished_tvshows_url": "/bindass-tv-past-shows/"}, "Channel [V]": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/cc/channel_v_in.jpg", "channelType": "IND", "running_tvshows_url": "/channel-v/", "finished_tvshows_url": "/channel-v-past-shows/"}, "DD National": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/dd/dd_national.jpg", "channelType": "IND", "running_tvshows_url": "/dd-national/", "finished_tvshows_url": "/dd-national-others-past-shows/"}, "Ary Digital": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/aa/atn_ary_digital.jpg", "channelType": "PAK", "running_tvshows_url": "/ary-digital/", "finished_tvshows_url": "/ary-past-shows/"}, "GEO TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/gg/geo_tv.jpg", "channelType": "PAK", "running_tvshows_url": "/geo-tv/", "finished_tvshows_url": "/geo-tv-past-shows/"}, "HUM TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/hh/hum_tv.jpg", "channelType": "PAK", "running_tvshows_url": "/hum-tv/", "finished_tvshows_url": "/hum-tv-past-shows/"}, "A PLUS": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/aa/a_plus.jpg", "channelType": "PAK", "running_tvshows_url": "/plus/", "finished_tvshows_url": "/plus-past-shows/"}, "POGO": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/pp/pogo.jpg", "channelType": "IND", "running_tvshows_url": "/pogo/", "finished_tvshows_url": None}, "Nickelodeon": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/nn/nickelodeon_in.jpg", "channelType": "IND", "running_tvshows_url": "/nick/", "finished_tvshows_url": None}, "Disney Channel": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/dd/disney_channel_in.jpg", "channelType": "IND", "running_tvshows_url": "/disney-channel/", "finished_tvshows_url": None}, "Hungama TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/hh/hungama.jpg", "channelType": "IND", "running_tvshows_url": "/hungama-tv/", "finished_tvshows_url": None}, "Cartoon Network": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/cc/cartoon_network_in.jpg", "channelType": "IND", "running_tvshows_url": "/cartoon-network/", "finished_tvshows_url": None}, "Star Pravah": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_pravah.jpg", "channelType": "IND", "running_tvshows_url": "/star-pravah/", "finished_tvshows_url": None}, "Zee Marathi": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/zz/zee_marathi.jpg", "channelType": "IND", "running_tvshows_url": "/zee-marathi/", "finished_tvshows_url": None}, "Star Utsav": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_utsav.jpg", "channelType": "IND", "running_tvshows_url": "/star-utsav/", "finished_tvshows_url": None}, "9X": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/num/9x_in.jpg", "channelType": "IND", "running_tvshows_url": "/9x/", "finished_tvshows_url": "/9x-past-shows/"}, "ZEE Bangla": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/zz/zee_bangla.jpg", "channelType": "IND", "running_tvshows_url": "/zee-bangla/", "finished_tvshows_url": "/zee-bangla-past-shows/"}, "Mahuaa TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/mm/mahuaa_bangla.jpg", "channelType": "IND", "running_tvshows_url": "/mahuaa-tv/", "finished_tvshows_url": "/mahuaa-tv-past-shows/"} } XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__retrieveChannelTVShows__'), tvChannels.values(), 'Retrieving channel TV Shows', 'Failed to retrieve video information, please try again later', line1='Takes about 5 minutes first time', line3='Refreshes data every month or on force refresh or on new add-on version') #save tvChannels in moving data request_obj.get_data()['tvChannels'] = tvChannels status = AddonUtils.saveObjToJsonFile(filepath, tvChannels) if status is not None: print 'Saved status = ' + str(status) AddonContext().addon.setSetting('drForceRefresh', 'false')
def addEmbeddedVideoInfo(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addEmbeddedVideoInfo_in_item__'), items, 'Retrieving video info', 'Failed to retrieve video information, please try again later')
def retrieveTVShowsAndSave(request_obj, response_obj): oldfilepath = AddonUtils.getCompleteFilePath(baseDirPath=Container().getAddonContext().addonProfile, extraDirPath=AddonUtils.ADDON_SRC_DATA_FOLDER, filename=OLD_CHANNELS_JSON_FILE, makeDirs=True) AddonUtils.deleteFile(oldfilepath) filepath = AddonUtils.getCompleteFilePath(baseDirPath=Container().getAddonContext().addonProfile, extraDirPath=AddonUtils.ADDON_SRC_DATA_FOLDER, filename=CHANNELS_JSON_FILE, makeDirs=True) refresh = Container().getAddonContext().addon.getSetting('drForceRefresh') if refresh == None or refresh != 'true': lastModifiedTime = AddonUtils.getFileLastModifiedTime(filepath) if lastModifiedTime is not None: diff = long((time.time() - lastModifiedTime) / 3600) if diff < 720: return else: Logger.logNotice(CHANNELS_JSON_FILE + ' was last created 30 days ago, refreshing data.') else: Logger.logNotice(CHANNELS_JSON_FILE + ' request to force refresh data. ') tvChannels = {"UTV Stars": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/uu/utv_stars.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=1274", "finished_tvshows_url": "/forumdisplay.php?f=1435"}, "Star Plus": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_plus.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=42", "finished_tvshows_url": "/forumdisplay.php?f=209"}, "Zee TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/zz/zee_tv.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=73", "finished_tvshows_url": "/forumdisplay.php?f=211"}, "Sony TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/set_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=63", "finished_tvshows_url": "/forumdisplay.php?f=210"}, "Life OK": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ll/life_ok_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=1375", "finished_tvshows_url": "/forumdisplay.php?f=1581"}, "Star Jalsha": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_jalsha.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=667", "finished_tvshows_url": "/forumdisplay.php?f=1057"}, "Sahara One": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/sahara_one.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=134", "finished_tvshows_url": "/forumdisplay.php?f=213"}, "Colors": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/cc/colors_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=176", "finished_tvshows_url": "/forumdisplay.php?f=374"}, "Sab TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/sony_sab_tv.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=254", "finished_tvshows_url": "/forumdisplay.php?f=454"}, "MTV (India/Pakistan)": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/mm/mtv_india.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=339", "finished_tvshows_url": "/forumdisplay.php?f=532"}, "Bindass TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/uu/utv_bindass.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=504", "finished_tvshows_url": "/forumdisplay.php?f=960"}, "Channel [V]": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/cc/channel_v_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=633", "finished_tvshows_url": "/forumdisplay.php?f=961"}, "DD National": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/dd/dd_national.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=535", "finished_tvshows_url": "/forumdisplay.php?f=801"}, "Ary Digital": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/aa/atn_ary_digital.jpg", "channelType": "PAK", "running_tvshows_url": "/forumdisplay.php?f=384", "finished_tvshows_url": "/forumdisplay.php?f=950"}, "GEO TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/gg/geo_tv.jpg", "channelType": "PAK", "running_tvshows_url": "/forumdisplay.php?f=413", "finished_tvshows_url": "/forumdisplay.php?f=894"}, "HUM TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/hh/hum_tv.jpg", "channelType": "PAK", "running_tvshows_url": "/forumdisplay.php?f=448", "finished_tvshows_url": "/forumdisplay.php?f=794"}, "A PLUS": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/aa/a_plus.jpg", "channelType": "PAK", "running_tvshows_url": "/forumdisplay.php?f=1327", "finished_tvshows_url": "/forumdisplay.php?f=1334"}, "POGO": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/pp/pogo.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=500", "finished_tvshows_url": None}, "Disney Channel": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/dd/disney_channel_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=479", "finished_tvshows_url": None}, "Hungama TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/hh/hungama.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=472", "finished_tvshows_url": "/forumdisplay.php?f=2102"}, "Cartoon Network": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/cc/cartoon_network_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=509", "finished_tvshows_url": None}, "Star Pravah": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_pravah.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=1138", "finished_tvshows_url": "/forumdisplay.php?f=1466"}, "Zee Marathi": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/zz/zee_marathi.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=1299", "finished_tvshows_url": "/forumdisplay.php?f=1467"}, "Star Vijay": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/ss/star_vijay_in.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=1609", "finished_tvshows_url": "/forumdisplay.php?f=1747"}, "ZEE Bangla": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/zz/zee_bangla.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=676", "finished_tvshows_url": "/forumdisplay.php?f=802"}, "Mahuaa TV": {"iconimage":"http://www.lyngsat-logo.com/logo/tv/mm/mahuaa_bangla.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=772", "finished_tvshows_url": "/forumdisplay.php?f=803"}, "Movies": {"iconimage":"http://2.bp.blogspot.com/-8IURT2pXsb4/T5BqxR2OhfI/AAAAAAAACd0/cc5fwuEQIx8/s1600/the_movies.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=260", "finished_tvshows_url": None}, "Latest & HQ Movies": {"iconimage":"http://2.bp.blogspot.com/-8IURT2pXsb4/T5BqxR2OhfI/AAAAAAAACd0/cc5fwuEQIx8/s1600/the_movies.jpg", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=20", "finished_tvshows_url": None}, "Awards & Concerts": {"iconimage":"https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQGOu4sxdHNUQC8BUic5rcuMB3VbHf864dKIF7g65aNc2ozDxQQ", "channelType": "IND", "running_tvshows_url": "/forumdisplay.php?f=36", "finished_tvshows_url": None}, } XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__retrieveChannelTVShows__'), tvChannels.values(), 'Retrieving channel TV Shows', 'Failed to retrieve video information, please try again later', line1='Takes about 5 minutes first time', line3='Refreshes data every month or on force refresh or on new add-on version') # save tvChannels in moving data request_obj.get_data()['tvChannels'] = tvChannels status = AddonUtils.saveObjToJsonFile(filepath, tvChannels) if status is not None: Logger.logNotice('Saved status = ' + str(status)) Container().getAddonContext().addon.setSetting('drForceRefresh', 'false')
def retieveMovieInfoAndAddItem(request_obj, response_obj): items = response_obj.get_item_list() XBMCInterfaceUtils.callBackDialogProgressBar( getattr(sys.modules[__name__], '__addMovieInfo_in_item'), items, 'Retrieving MOVIE info', 'Failed to retrieve movie information, please try again later')