Beispiel #1
0
    def stats(self):
        """ controller for the stats widget """

        try:
            m = g.p.connect()
        except ConnectionClosed:
            return render('/null.html')

        c.stats = m.stats()
        aa = AlbumArt()
        c.dir_size = aa.dir_size()

        return render('/stats.html')
Beispiel #2
0
    def stats(self):
        """ controller for the stats widget """

        try:
            self.m = g.p.connect()
        except (NoMPDConnection, ConnectionClosed):
            return render('/null.html')

        c.stats = self.m.stats()
        aa = AlbumArt()
        c.dir_size = aa.dir_size()

        return render('/stats.html')