Exemplo n.º 1
0
Arquivo: web.py Projeto: gstofer/strmr
	def nextsong(self):
		"""
			Returns a json object with information on the next song to play
		"""
		max = db.maxSongs()
		id = helper.getrandom(max)
		song = db.selectPlay(id)
		retval = json.dumps(song.getDict()) 
		return retval
Exemplo n.º 2
0
Arquivo: web.py Projeto: gstofer/strmr
	def play(self, id = None):
		song = db.selectPlay(id)
		t = Template(file=tempdir + 'play.tmpl')
		t.song = song
		return _tostr(t)