mirror of
https://github.com/beetbox/beets.git
synced 2026-01-17 21:52:34 +01:00
Merge branch 'master' of github.com:sampsyo/beets into distance-refactor
Conflicts: beets/autotag/match.py beets/config_default.yaml docs/changelog.rst docs/reference/config.rst
This commit is contained in:
commit
4cfd1a874f
4 changed files with 20 additions and 9 deletions
3
.hgtags
3
.hgtags
|
|
@ -19,3 +19,6 @@ f3cd4c138c6f40dc324a23bf01c4c7d97766477e 1.0rc2
|
|||
f28ea9e2ef8d39913d79dbba73db280ff0740c50 v1.1.0-beta.2
|
||||
8f070ce28a7b33d8509b29a8dbe937109bbdbd21 v1.1.0-beta.3
|
||||
97f04ce252332dbda013cbc478d702d54a8fc1bd v1.1.0
|
||||
b3f7b5267a2f7b46b826d087421d7f4569211240 v1.2.0
|
||||
b3f7b5267a2f7b46b826d087421d7f4569211240 v1.2.0
|
||||
ecff182221ec32a9f6549ad3ce8d2ab4c3e5568a v1.2.0
|
||||
|
|
|
|||
|
|
@ -35,14 +35,16 @@ database_changed = False
|
|||
# easier.
|
||||
class BufferedSocket(object):
|
||||
"""Socket abstraction that allows reading by line."""
|
||||
def __init__(self, sep='\n'):
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
def __init__(self, host, port, sep='\n'):
|
||||
if host[0] == '/':
|
||||
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
self.sock.connect(host)
|
||||
else:
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.sock.connect((host, port))
|
||||
self.buf = ''
|
||||
self.sep = sep
|
||||
|
||||
def connect(self, host, port):
|
||||
self.sock.connect((host, port))
|
||||
|
||||
def readline(self):
|
||||
while self.sep not in self.buf:
|
||||
data = self.sock.recv(1024)
|
||||
|
|
@ -67,8 +69,7 @@ def update_mpd(host='localhost', port=6600, password=None):
|
|||
"""
|
||||
print('Updating MPD database...')
|
||||
|
||||
s = BufferedSocket()
|
||||
s.connect(host, port)
|
||||
s = BufferedSocket(host, port)
|
||||
resp = s.readline()
|
||||
if 'OK MPD' not in resp:
|
||||
print('MPD connection failed:', repr(resp))
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
1.2.0 (in development)
|
||||
----------------------
|
||||
1.2.0 (June 5, 2013)
|
||||
--------------------
|
||||
|
||||
There's a *lot* of new stuff in this release: new data sources for the
|
||||
autotagger, new plugins to look for problems in your library, tracking the
|
||||
|
|
@ -107,6 +107,8 @@ As usual, there were also lots of other great littler enhancements:
|
|||
Johannes Baiter.
|
||||
* The :ref:`fields-cmd` command shows template fields provided by plugins.
|
||||
Thanks again to Pedro Silva.
|
||||
* :doc:`/plugins/mpdupdate`: You can now communicate with MPD over a Unix
|
||||
domain socket. Thanks to John Hawthorn.
|
||||
|
||||
And a batch of fixes:
|
||||
|
||||
|
|
|
|||
|
|
@ -17,3 +17,8 @@ MPD server. You can do that using an ``mpdupdate:`` section in your
|
|||
password: seekrit
|
||||
|
||||
With that all in place, you'll see beets send the "update" command to your MPD server every time you change your beets library.
|
||||
|
||||
If you want to communicate with MPD over a Unix domain socket instead over
|
||||
TCP, just give the path to the socket in the filesystem for the ``host``
|
||||
setting. (Any ``host`` value starting with a slash is interpreted as a domain
|
||||
socket.)
|
||||
|
|
|
|||
Loading…
Reference in a new issue