mirror of
https://github.com/beetbox/beets.git
synced 2026-02-28 10:15:23 +01:00
documentation
--HG-- extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40118
This commit is contained in:
parent
ceeb4908c7
commit
7ff7eabf7f
1 changed files with 6 additions and 0 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue