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
def play(self, id = None): song = db.selectPlay(id) t = Template(file=tempdir + 'play.tmpl') t.song = song return _tostr(t)