Esempio n. 1
0
def contentsByTagPl(param):
	x = Videos()
	p = Playlists()
	
	hash = param['hash']
	publc = param['publc']
	
	# create a hash
	m = md5.new(publc + _private_key())
	
	# check if this hash is equal to the one transmitted
	if m.hexdigest() == hash:
		data = p.getPublicPlaylistsByTag(param)
		dat = {
			'id': 1234, # just a random id
			'data': data,
			'records': p.getPublicPlaylistsByTagCount(param)
		}
	else:
		dat = {
			'id': 1234, # just a random id
			'data': False,
			'records': 0
		}
	return dat