diff --git a/beets/player/bpd.py b/beets/player/bpd.py index 40c872b61..f00186e17 100755 --- a/beets/player/bpd.py +++ b/beets/player/bpd.py @@ -701,6 +701,7 @@ class BGServer(Server): return self._items_info(self.lib.get(query)) def _get_by_path(self, path): + """Helper function returning the item at a given path.""" it = self.lib.get(beets.library.MatchQuery('path', path)) try: return it.next() @@ -717,6 +718,10 @@ class BGServer(Server): self.playlist_version += 1 return SuccessResponse(['Id: ' + str(track.id)]) + # The functions below hook into the half-implementations provided + # by the base class. Together, they're enough to implement all + # normal playback functionality. + def cmd_play(self, index=-1): super(BGServer, self).cmd_play(index) if self.current_index > -1: # Not stopped. @@ -735,3 +740,4 @@ class BGServer(Server): if __name__ == '__main__': BGServer(beets.Library('library.blb')).run() +