def songinfo(self, songID): """ View lastfm info about a song @param songID """ c.song = musicDB.findsong(songID) return render("/derived/music/lastfm.html")
def view(self): """ View music library page @return rendered page """ c.title = 'Music Collection' c.songs = musicDB.findall() c.uid = config.get("facebook.uid") c.url = construct_url(request.environ, with_query_string=False, with_path_info=False) c.isadmin = isadmin() if islocalhost(): c.url = "http://0.0.0.0:"+str(config.get("port")) return render('/derived/music/view.html')
def view(self): """ View music library page @return rendered page """ c.title = 'Music Collection' c.songs = musicDB.findall() c.uid = config.get("facebook.uid") c.url = construct_url(request.environ, with_query_string=False, with_path_info=False) c.isadmin = isadmin() if islocalhost(): c.url = "http://0.0.0.0:" + str(config.get("port")) return render('/derived/music/view.html')
def addmusic(self): """ Add music to the library. Provide path to folder containing music and all music is added to the library. @return rendered page """ folder = request.params.get('folder') if folder: # uncomment to clear DB everything a new folder is added. # musicDB.clear() folder = request.params['folder'] musicDB.add(folder) c.message = "Music added" else: c.message = "Add music" return render('/derived/music/addmusic.html')
def index(self): return render("/derived/about/about.html")
def index(self): """ Render admin page """ c.host = getIP() return render("/derived/admin/index.html")