Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
def Get_RSS_Videos_strict(url):
	global prev_letter
	global sorting
	sorting = common.getsorting(url)
	sort_letter = "None"
	link = cache.getcontent(url,UAS)
	link = link.replace("\r", "")
	link = link.replace("\n", "")
	nmatch = re.compile('<item>(.+?)<\/item>').findall(link)
	totalitems = len(nmatch)
	for link in nmatch:
		tmatch=re.compile('.+?<title>\[(.+?)\] (.+?) (.+?)</title>.+?<description>(.+?)<\/description>.+?<author>(.+?)<\/author>.+?<category>(.+?)<comments>.+?<media:thumbnail url="(.+?)".+?<media:content url=".+?archive.org/(.+?)" type=".+?" medium="video" \/>.+?<media:starRating average="(.+?)".+?\/>.+?<pubDate>(.+?)<\/pubDate>.+?').findall(link)
		for num,platform,name,plot,director,categories,thumbnail,link,rating,pubdate in tmatch:
			if not link=="":
				num = int(num)
				year = common.get_year(pubdate)
				date = common.get_date(pubdate)
				duration = common.get_duration(name)
				if sorting==1:
					if not prev_letter==name[:1]:
						prev_letter = name[:1]
						sort_letter = prev_letter
					else:
						sort_letter = "None"
				fanart = ""+str(num)+".png"
				fanart = xbmc.translatePath( os.path.join( addonpath, 'Images', 'Fanart', 'Games', fanart ) )
				year = int(year)
				rating = round(float(rating),2)
				name = ""+name+" ["+str(rating)+"]"
				director = common.clean_director(director)
				category = "<category>"+categories+""
				genre = common.getgenres(category)
				categories = common.get_categories(category)
				writer = common.get_writer(name)
				thumbnail = cache.img_getcontent(thumbnail,num,UAS)
				url = "plugin://plugin.video.tas?mode=5&url=" + link
				addLink(common.cleanstring(name),url,thumbnail,year,plot,rating,director,writer,genre,categories,fanart,num,totalitems,date,sort_letter,duration)
			else:
				totalitems = totalitems - 1
	prev_letter = "Unset"
	return