Exemplo n.º 1
0
def newGenre(series):
	genres = series['genres'].strip('|').split('|')
	for genre in genres:
		DB.storeData('genre',{'tag':genre,'genreid':'NULL'})
		result = DB.selectWhere('genre','tag',genre,genreid)
		if result:
			DB.storeData('genre_relation',{'genreid':result[0][0]
				,'seriesid':series['seriesid']})