From 83ad70565ccd7d7e8eddd20f97fc92f6fc0db53d Mon Sep 17 00:00:00 2001 From: "adrian.sampson" Date: Tue, 24 Mar 2009 03:44:37 +0000 Subject: [PATCH] small bugs in library listing; Theremin now works --HG-- extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40149 --- beets/player/bpd.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/beets/player/bpd.py b/beets/player/bpd.py index 4f8f255c5..142ee28c0 100755 --- a/beets/player/bpd.py +++ b/beets/player/bpd.py @@ -768,6 +768,7 @@ class BGServer(Server): # artists if not artist: + artists = self.lib.artists() out += ['directory: ' + a for a in artists] # albums @@ -776,11 +777,12 @@ class BGServer(Server): out += ['directory: ' + seq_to_path(alb) for alb in albums] # tracks + items = self.lib.items(artist or None, album or None) if info: - str_func = self._item_info + for item in items: + out += self._item_info(item) else: - str_func = lambda i: 'file: ' + self._item_path(i) - out += map(str_func, lib.items(artist or None, album or None)) + out += ['file: ' + self._item_path(i) for i in items] return SuccessResponse(out) @@ -842,7 +844,7 @@ class BGServer(Server): 'uptime: ' + str(int(time.time() - self.startup_time)), 'playtime: ' + '0', 'db_playtime: ' + '0', - 'db_update: ' + '0', + 'db_update: ' + str(int(self.startup_time)), ] return SuccessResponse(out)