Example #1
0
File: web.py Project: 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
Example #2
0
File: web.py Project: gstofer/strmr
	def play(self, id = None):
		song = db.selectPlay(id)
		t = Template(file=tempdir + 'play.tmpl')
		t.song = song
		return _tostr(t)