예제 #1
0
파일: music.py 프로젝트: nandittiku/MyMusic
 def songinfo(self, songID):
     """
     View lastfm info about a song
     @param songID
     """
     c.song = musicDB.findsong(songID)
     return render("/derived/music/lastfm.html")
예제 #2
0
파일: music.py 프로젝트: nandittiku/MyMusic
 def songinfo(self, songID):
     """
     View lastfm info about a song
     @param songID
     """
     c.song = musicDB.findsong(songID)
     return render("/derived/music/lastfm.html")
예제 #3
0
파일: music.py 프로젝트: nandittiku/MyMusic
 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')
예제 #4
0
파일: music.py 프로젝트: nandittiku/MyMusic
 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')
예제 #5
0
파일: music.py 프로젝트: nandittiku/MyMusic
    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')
예제 #6
0
파일: music.py 프로젝트: nandittiku/MyMusic
 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')
예제 #7
0
파일: about.py 프로젝트: nandittiku/MyMusic
 def index(self):
     return render("/derived/about/about.html")
예제 #8
0
파일: admin.py 프로젝트: nandittiku/MyMusic
 def index(self):
     """
     Render admin page
     """
     c.host = getIP()
     return render("/derived/admin/index.html")
예제 #9
0
파일: about.py 프로젝트: nandittiku/MyMusic
 def index(self):
     return render("/derived/about/about.html")