def Get_Categories(url): link = cache.getcontent(url,UAS) link = link.replace("\r", "") link = link.replace("\n", "") match=re.compile('<item>.+?<title>(.+?)</title>.+?<link>(.+?)<\/link>').findall(link) for name,link in match: fanart = common.get_category_fanthumb(name, "Fanart") print fanart addDir(name,link,2,common.get_category_fanthumb(name, "Thumbnail"),fanart)
def Generate_Index(): dimg = common.get_image_path(xbmc.translatePath(os.path.join( addonpath, 'resources', 'images', 'icons', 'default' ))) latest = xbmc.translatePath(os.path.join(dimg, "latest.png")) notables = xbmc.translatePath(os.path.join(dimg, "not.png")) bbs = xbmc.translatePath(os.path.join(dimg, "bbs.png")) tools = xbmc.translatePath(os.path.join(dimg, "tools.png")) string_latest_videos = common.get_lstring(30800) string_notables = common.get_lstring(30801) string_bbs = common.get_lstring(30802) string_ad_util = common.get_lstring(30803) addDir(string_latest_videos,'http://tasvideos.org/publications.rss',2, latest, common.get_category_fanthumb("Latest Videos", "Fanart")) addDir(string_notables,'http://tasvideos.org/notables.rss',1, notables, common.get_category_fanthumb("Notables", "Fanart")) addDir(string_bbs,'http://tasvideos.org/systems.rss',1, bbs, common.get_category_fanthumb("Browse By System", "Fanart")) addDir(string_ad_util,'none',3, tools, common.get_category_fanthumb("Addon Utilities", "Fanart"))