documentation

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40118
This commit is contained in:
adrian.sampson 2009-02-06 22:16:29 +00:00
parent ceeb4908c7
commit 7ff7eabf7f

View file

@ -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()