]> kaliko git repositories - python-musicpd.git/log
python-musicpd.git
5 years agoautopep8 style reformatting
Kaliko Jack [Thu, 31 Jan 2019 14:47:13 +0000 (15:47 +0100)]
autopep8 style reformatting

5 years agoBump version, update copyright
Kaliko Jack [Tue, 29 Jan 2019 16:24:45 +0000 (17:24 +0100)]
Bump version, update copyright

5 years agoAdds support for partition commands
Naglis Jonaitis [Sat, 22 Dec 2018 13:16:08 +0000 (15:16 +0200)]
Adds support for partition commands

https://musicpd.org/doc/html/protocol.html#partition-commands

5 years agoFixes typo in `musicpd.MPDClient` docstring
Naglis Jonaitis [Fri, 28 Dec 2018 12:00:35 +0000 (14:00 +0200)]
Fixes typo in `musicpd.MPDClient` docstring

6 years agoReleasing v0.4.3 v0.4.3
Kaliko Jack [Sat, 17 Nov 2018 18:11:24 +0000 (19:11 +0100)]
Releasing v0.4.3

6 years agoCleanup doc setting and build
Kaliko Jack [Sat, 17 Nov 2018 18:08:20 +0000 (19:08 +0100)]
Cleanup doc setting and build

6 years agoFixed tests
Kaliko Jack [Fri, 16 Nov 2018 16:31:17 +0000 (17:31 +0100)]
Fixed tests

6 years agopassword is a command in MPD protocol...
Kaliko Jack [Fri, 16 Nov 2018 16:14:25 +0000 (17:14 +0100)]
password is a command in MPD protocol...

6 years agoMinor changes in build setup
Kaliko Jack [Fri, 16 Nov 2018 15:39:15 +0000 (16:39 +0100)]
Minor changes in build setup

6 years agoImproved documentation
Kaliko Jack [Fri, 16 Nov 2018 15:38:37 +0000 (16:38 +0100)]
Improved documentation

6 years agoRemove useless GPL license file
Kaliko Jack [Wed, 14 Nov 2018 18:26:25 +0000 (19:26 +0100)]
Remove useless GPL license file

6 years agoAdd sphinx doc (closes #3)
Kaliko Jack [Wed, 14 Nov 2018 18:22:03 +0000 (19:22 +0100)]
Add sphinx doc (closes #3)

6 years agoAdd .gitlab-ci.yml
Kaliko Jack [Thu, 1 Nov 2018 17:22:11 +0000 (18:22 +0100)]
Add .gitlab-ci.yml

6 years agoAdd suport for environment variables MPD_HOST/MPD_PORT/XDG_RUNTIME_DIR
Kaliko Jack [Thu, 1 Nov 2018 16:47:06 +0000 (17:47 +0100)]
Add suport for environment variables MPD_HOST/MPD_PORT/XDG_RUNTIME_DIR

9 years agoAdd travis
Kaliko Jack [Fri, 6 Feb 2015 22:17:19 +0000 (23:17 +0100)]
Add travis

9 years agoUse of setuptools
Kaliko Jack [Fri, 6 Feb 2015 21:26:05 +0000 (22:26 +0100)]
Use of setuptools

Update CHANGES, bump version

10 years agoReleasing v0.4.2 v0.4.2
Kaliko Jack [Sun, 23 Nov 2014 13:15:33 +0000 (14:15 +0100)]
Releasing v0.4.2

10 years agoMoved _iterator_wrapper to a decorator
Kaliko Jack [Tue, 18 Nov 2014 14:34:42 +0000 (15:34 +0100)]
Moved _iterator_wrapper to a decorator

10 years agoUpdate tests, improve test on iterating
Kaliko Jack [Tue, 18 Nov 2014 14:33:52 +0000 (15:33 +0100)]
Update tests, improve test on iterating

10 years agoAdd config command
Kaliko Jack [Mon, 17 Nov 2014 14:40:28 +0000 (15:40 +0100)]
Add config command

10 years agoUpdate commands documentation
Kaliko Jack [Mon, 17 Nov 2014 11:01:56 +0000 (12:01 +0100)]
Update commands documentation

10 years agoAdd rangeid command
Kaliko Jack [Sun, 16 Nov 2014 23:32:23 +0000 (00:32 +0100)]
Add rangeid command

10 years agoAdd addtagid and cleartagid commands (MPD 0.19)
Kaliko Jack [Sun, 16 Nov 2014 22:57:54 +0000 (23:57 +0100)]
Add addtagid and cleartagid commands (MPD 0.19)

Also add missing priority commands (prio and prioid)

10 years agoAdd mounts and neighbors commands (MPD 0.19)
Kaliko Jack [Fri, 7 Nov 2014 11:08:38 +0000 (12:08 +0100)]
Add mounts and neighbors commands (MPD 0.19)

10 years agoAdd unittest
Kaliko Jack [Fri, 20 Jun 2014 11:56:54 +0000 (13:56 +0200)]
Add unittest

10 years agoDocument range capability
Kaliko Jack [Thu, 19 Jun 2014 12:38:01 +0000 (14:38 +0200)]
Document range capability

10 years agoAllow send_noidle to cancel idle as plain noidle does
Kaliko Jack [Thu, 19 Jun 2014 11:58:05 +0000 (13:58 +0200)]
Allow send_noidle to cancel idle as plain noidle does

10 years agoFixed noidle command v0.4.1
Kaliko Jack [Tue, 17 Jun 2014 14:38:14 +0000 (16:38 +0200)]
Fixed noidle command

10 years agoDocument send_*/fetch_* and idle commands
Kaliko Jack [Tue, 17 Jun 2014 14:37:14 +0000 (16:37 +0200)]
Document send_*/fetch_* and idle commands

10 years agoAdd explicit file encoding for open in setup.py
Kaliko Jack [Sun, 19 Jan 2014 16:33:05 +0000 (17:33 +0100)]
Add explicit file encoding for open in setup.py

10 years agoAvoid potential dangerous default value [] as argument v0.4.0
Kaliko Jack [Sun, 15 Dec 2013 10:16:49 +0000 (11:16 +0100)]
Avoid potential dangerous default value [] as argument

10 years agoReleasing v0.4.0
Kaliko Jack [Sat, 18 Jan 2014 11:09:15 +0000 (12:09 +0100)]
Releasing v0.4.0

10 years agoUpates changelog
Kaliko Jack [Wed, 15 Jan 2014 08:33:59 +0000 (09:33 +0100)]
Upates changelog

10 years agoAdd range capabilities
Kaliko Jack [Tue, 14 Jan 2014 15:49:19 +0000 (16:49 +0100)]
Add range capabilities

11 years agoFixed documentation
Kaliko Jack [Fri, 15 Nov 2013 19:28:47 +0000 (20:28 +0100)]
Fixed documentation

11 years agoAdd some pylint exclusions
Kaliko Jack [Fri, 15 Nov 2013 19:15:37 +0000 (20:15 +0100)]
Add some pylint exclusions

11 years agoFixed documentation
Kaliko Jack [Fri, 15 Nov 2013 14:33:49 +0000 (15:33 +0100)]
Fixed documentation

11 years agoPreparing 0.4 release
Kaliko Jack [Tue, 12 Nov 2013 19:16:15 +0000 (20:16 +0100)]
Preparing 0.4 release

11 years agoAdd readcomments and toggleoutput commands
Kaliko Jack [Tue, 12 Nov 2013 18:43:47 +0000 (19:43 +0100)]
Add readcomments and toggleoutput commands

11 years agoFixed py_modules in setup.py
Kaliko Jack [Sun, 2 Jun 2013 13:27:28 +0000 (15:27 +0200)]
Fixed py_modules in setup.py

Mention explicitly py2 is not supported

11 years agoEase unitesting with mock
Kaliko Jack [Thu, 9 May 2013 12:26:54 +0000 (14:26 +0200)]
Ease unitesting with mock

11 years agoRenamed project mpd→musicpd v0.3.1b
Kaliko Jack [Thu, 9 May 2013 08:32:42 +0000 (10:32 +0200)]
Renamed project mpd→musicpd

11 years agoUse of hasattr instead of isinstance in disconnect
Kaliko Jack [Mon, 15 Apr 2013 19:21:14 +0000 (21:21 +0200)]
Use of hasattr instead of isinstance in disconnect

11 years agoExplicit R/W utf-8 encoded bytes to socket
Kaliko Jack [Mon, 15 Apr 2013 18:17:07 +0000 (20:17 +0200)]
Explicit R/W utf-8 encoded bytes to socket

python-mpd now deals only with unicode

11 years agoHandles better lost connections
Kaliko Jack [Mon, 15 Apr 2013 18:13:57 +0000 (20:13 +0200)]
Handles better lost connections

12 years agoUpdate changelog
Kaliko Jack [Thu, 11 Oct 2012 13:00:16 +0000 (15:00 +0200)]
Update changelog

12 years agoNew commands
Kaliko Jack [Thu, 11 Oct 2012 12:57:49 +0000 (14:57 +0200)]
New commands

* added searchadd, searchaddpl, seekcur commands
* new client to client commands

12 years agopython3 conversion
kaliko [Thu, 4 Oct 2012 15:28:45 +0000 (17:28 +0200)]
python3 conversion

Only supports python >= 3.2

13 years agosetup.py: incrementing version number to 0.3.0 python2 v0.3.0
J. Alexander Treuman [Tue, 14 Dec 2010 01:40:57 +0000 (20:40 -0500)]
setup.py: incrementing version number to 0.3.0

13 years agoREADME.txt: removing warning about iterate = True
J. Alexander Treuman [Tue, 14 Dec 2010 01:14:27 +0000 (20:14 -0500)]
README.txt: removing warning about iterate = True

Iterators are considered safe now, as all programming errors now raise an
exception instead of breaking horribly.  No need to scare people away from
it anymore.

13 years agoCHANGES.txt: adding more changes in prep for 0.3.0 release
J. Alexander Treuman [Tue, 14 Dec 2010 01:13:27 +0000 (20:13 -0500)]
CHANGES.txt: adding more changes in prep for 0.3.0 release

13 years agoREADME.txt: updating URLs
J. Alexander Treuman [Tue, 14 Dec 2010 01:06:48 +0000 (20:06 -0500)]
README.txt: updating URLs

13 years agompd.py: if command retval is None, don't require fetching
J. Alexander Treuman [Tue, 14 Dec 2010 00:47:23 +0000 (19:47 -0500)]
mpd.py: if command retval is None, don't require fetching

13 years agoadding replay_gain_mode and replay_gain_status commands
J. Alexander Treuman [Mon, 13 Dec 2010 23:11:21 +0000 (18:11 -0500)]
adding replay_gain_mode and replay_gain_status commands

13 years agompd.py: support commands with underscores
J. Alexander Treuman [Mon, 13 Dec 2010 23:04:00 +0000 (18:04 -0500)]
mpd.py: support commands with underscores

13 years agoadding mixrampdb and mixrampdelay commands
J. Alexander Treuman [Mon, 13 Dec 2010 22:53:48 +0000 (17:53 -0500)]
adding mixrampdb and mixrampdelay commands

13 years agoadding findadd and rescan commands
J. Alexander Treuman [Mon, 13 Dec 2010 22:50:29 +0000 (17:50 -0500)]
adding findadd and rescan commands

13 years agoadding decoders command
J. Alexander Treuman [Mon, 13 Dec 2010 22:47:49 +0000 (17:47 -0500)]
adding decoders command

13 years agosetup.py: updating classifiers
J. Alexander Treuman [Mon, 13 Dec 2010 22:18:27 +0000 (17:18 -0500)]
setup.py: updating classifiers

License is now LGPL, not GPL.  Also, I think it's about time we consider
python-mpd to be production-ready. ;)

13 years agodoc/commands.txt: updating args
J. Alexander Treuman [Mon, 13 Dec 2010 22:05:59 +0000 (17:05 -0500)]
doc/commands.txt: updating args

13 years agochanging license to LGPL
J. Alexander Treuman [Mon, 13 Dec 2010 21:02:29 +0000 (16:02 -0500)]
changing license to LGPL

13 years agoadding sticker commands
J. Alexander Treuman [Mon, 29 Nov 2010 19:11:19 +0000 (14:11 -0500)]
adding sticker commands

13 years agompd.py: adding support for spaces in command names
J. Alexander Treuman [Mon, 29 Nov 2010 18:51:39 +0000 (13:51 -0500)]
mpd.py: adding support for spaces in command names

14 years agompd.py: always compare self._sock to None
J. Alexander Treuman [Mon, 29 Nov 2010 02:17:24 +0000 (21:17 -0500)]
mpd.py: always compare self._sock to None

14 years agompd.py: updating _connect_tcp() with new socket code
J. Alexander Treuman [Mon, 29 Nov 2010 01:36:36 +0000 (20:36 -0500)]
mpd.py: updating _connect_tcp() with new socket code

_connect_tcp() is largely based on Python's socket.create_connection().
Previously, this code contained two bugs related to raising exceptions.

The first bug was introduced by my clumsy attempt to update the code to use
the new preferred method of raising exceptions (the same mistake was made
in the Python 3 port of the socket module).  Instead of raising
socket.error with the value of the original exception, socket.error was
raised with the original exception as the value of the new exception, thus
nesting an exception within an exception.  Python 3.1.3 fixed this by
simply re-raising the original exception.

The second bug is hit when getaddrinfo() returns an empty list.  A
socket.error is raised with a single string as its argument, instead of a
2-tuple as required by its parent class, IOError.  This bug continues to
persist in Python 3.1.3 as well as the latest svn tree.

This commit updates _connect_tcp() to be a nearly identical copy of the
Python 3.1.3 version of socket.create_connection(), except that
ConnectionError is raised when getaddrinfo() returns an empty list.

14 years agoremoving TODO.txt
J. Alexander Treuman [Thu, 15 Jul 2010 22:22:32 +0000 (18:22 -0400)]
removing TODO.txt

I maintain a separate personal TODO file for python-mpd which supercedes
this one, but it's really not fit for inclusion.

14 years agoCHANGES.txt: adding changes in prep for 0.3.0 release
J. Alexander Treuman [Thu, 15 Jul 2010 22:17:59 +0000 (18:17 -0400)]
CHANGES.txt: adding changes in prep for 0.3.0 release

14 years agompd.py: clear command list if an exception is raised
J. Alexander Treuman [Thu, 15 Jul 2010 21:52:54 +0000 (17:52 -0400)]
mpd.py: clear command list if an exception is raised

This fixes a very longstanding bug where an MPD command error would raise
an exception, but not clear the command list. This would prevent further
commands from being executed until the command list was completed, which
was impossible since the MPD command error broke out of the command list
on the server side.

14 years agompd.py: unset iterating flag if an exception is raised
J. Alexander Treuman [Thu, 15 Jul 2010 21:49:53 +0000 (17:49 -0400)]
mpd.py: unset iterating flag if an exception is raised

This fixes a bug where an MPD command error would raise an exception, but
leave the iterating flag set, preventing further commands from being
executed.

14 years agompd.py: don't allow command_list_end if already iterating
J. Alexander Treuman [Thu, 15 Jul 2010 21:27:23 +0000 (17:27 -0400)]
mpd.py: don't allow command_list_end if already iterating

14 years agompd.py: set iterating flag before returning iterator
J. Alexander Treuman [Thu, 15 Jul 2010 21:26:27 +0000 (17:26 -0400)]
mpd.py: set iterating flag before returning iterator

14 years agompd.py: check if iterating before fetching response
J. Alexander Treuman [Thu, 15 Jul 2010 21:12:53 +0000 (17:12 -0400)]
mpd.py: check if iterating before fetching response

If an iterator is currently in progress, all functions which fetch a
response (such as <cmd>() and fetch_<cmd>()) will be disabled, as well as
command lists.  This makes iterators much more reliable by preventing code
from reading a response while an iterator is trying to read another
response.  Previously this was allowed, and would corrupt the library state
by providing false responses to both the iterator and the code trying to
fetch a different response.

14 years agompd.py: remove superfluous StopIteration exceptions
J. Alexander Treuman [Thu, 15 Jul 2010 20:48:19 +0000 (16:48 -0400)]
mpd.py: remove superfluous StopIteration exceptions

14 years agoREADME.txt: give an example that actually works
J. Alexander Treuman [Thu, 15 Jul 2010 18:44:45 +0000 (14:44 -0400)]
README.txt: give an example that actually works

14 years agoupdating copyright years
J. Alexander Treuman [Thu, 15 Jul 2010 18:43:54 +0000 (14:43 -0400)]
updating copyright years

14 years agosetup.py: updating URL
J. Alexander Treuman [Thu, 15 Jul 2010 18:38:55 +0000 (14:38 -0400)]
setup.py: updating URL

14 years agompd.py: adding fileno() to export socket FD
J. Alexander Treuman [Thu, 15 Jul 2010 17:52:40 +0000 (13:52 -0400)]
mpd.py: adding fileno() to export socket FD

This allows access to the socket FD for polling if it can be written
to/read from.  This is useful with, for example, the idle command.  Simply
call send_idle(), poll the socket FD with select/poll/etc to check if it's
ready for reading, and if it is, call fetch_idle() to see what changed.
Note that select et al. call fileno() on any objects you pass to them, so
you can simply pass the MPDClient instance itself to these functions
instead of the FD returned by fileno().

14 years agompd.py: tidying up _execute()
J. Alexander Treuman [Thu, 15 Jul 2010 17:34:44 +0000 (13:34 -0400)]
mpd.py: tidying up _execute()

14 years agompd.py: adding support for asynchronous commands
J. Alexander Treuman [Thu, 15 Jul 2010 17:19:57 +0000 (13:19 -0400)]
mpd.py: adding support for asynchronous commands

send_<cmd>/fetch_<cmd> may now be used to send/fetch the command <cmd>.
fetch_<cmd> may be called multiple times to queue up various commands, but
they must be fetched in the same order they were sent.  This functionality
cannot be mixed with command lists.

15 years agompd.py: don't use has_key()
J. Alexander Treuman [Fri, 11 Sep 2009 23:22:11 +0000 (19:22 -0400)]
mpd.py: don't use has_key()

key in obj is easier to read, and even a little faster.

15 years agodoc/commands.txt: updating to match the new internal API
J. Alexander Treuman [Fri, 11 Sep 2009 23:20:50 +0000 (19:20 -0400)]
doc/commands.txt: updating to match the new internal API

15 years agompd.py: internal API cleanup
J. Alexander Treuman [Fri, 11 Sep 2009 23:15:23 +0000 (19:15 -0400)]
mpd.py: internal API cleanup

Function names should be more readable now, and the new naming scheme will
fit in better with the upcoming asynchronous API.

15 years agompd.py: raise ConnectionError if unix sockets aren't supported
J. Alexander Treuman [Wed, 10 Jun 2009 01:49:35 +0000 (21:49 -0400)]
mpd.py: raise ConnectionError if unix sockets aren't supported

15 years agopreliminary unix socket support
J. Alexander Treuman [Sun, 7 Jun 2009 19:39:38 +0000 (15:39 -0400)]
preliminary unix socket support

If the host passed to connect() starts with a "/", then a connection
attempt is made to the unix socket at the specified path.  The port
argument is currently still required, but will be ignored.  Attempting to
connect to a unix socket on Windows will raise an AttributeError (because
socket.AF_UNIX isn't defined), however this will later be changed.

15 years agoadding consume and single commands
J. Alexander Treuman [Mon, 1 Jun 2009 22:33:49 +0000 (18:33 -0400)]
adding consume and single commands

15 years agoadding idle and noidle commands
J. Alexander Treuman [Mon, 1 Jun 2009 22:16:54 +0000 (18:16 -0400)]
adding idle and noidle commands

Note that these commands aren't very usable in their current form.  idle()
blocks while waiting for events, and will thus hang if none are received.
Calling noidle() from another thread will cause idle() to return, but
python-mpd isn't considered re-entrant, so sharing instances between
threads isn't recommended.

15 years agoadding listplaylists command
J. Alexander Treuman [Mon, 1 Jun 2009 21:53:40 +0000 (17:53 -0400)]
adding listplaylists command

15 years agorearranging commands to match new protocol documentation
J. Alexander Treuman [Mon, 1 Jun 2009 16:41:30 +0000 (12:41 -0400)]
rearranging commands to match new protocol documentation

16 years agosetup.py: incrementing version number to 0.2.1 v0.2.1
J. Alexander Treuman [Mon, 30 Jun 2008 22:01:01 +0000 (18:01 -0400)]
setup.py: incrementing version number to 0.2.1

16 years agoCHANGES.txt: document change in previous commit
J. Alexander Treuman [Mon, 30 Jun 2008 21:59:19 +0000 (17:59 -0400)]
CHANGES.txt: document change in previous commit

16 years agompd.py: adding a workaround for systems missing socket.AI_ADDRCONFIG
J. Alexander Treuman [Mon, 30 Jun 2008 19:14:10 +0000 (15:14 -0400)]
mpd.py: adding a workaround for systems missing socket.AI_ADDRCONFIG

Python on Windows doesn't define socket.AI_ADDRCONFIG.  This is likely
because the flag is only supported by getaddrinfo() on Vista or later.

16 years agosetup.py: incrementing version number to 0.2.0 v0.2.0
J. Alexander Treuman [Thu, 3 Apr 2008 18:52:41 +0000 (14:52 -0400)]
setup.py: incrementing version number to 0.2.0

16 years agompd.py: catch all exceptions raised by _hello()
J. Alexander Treuman [Thu, 3 Apr 2008 04:23:36 +0000 (00:23 -0400)]
mpd.py: catch all exceptions raised by _hello()

I normally consider it bad form to catch all exceptions, since it can
result in lost KeyboardInterrupts.  But in this case we re-raise the
exception after cleaning up, so it's ok.

While _hello() itself only raises socket.error or an MPDError subclass, a
KeyboardInterrupt would previously go uncaught.  Since the connection was
never cleaned up, it could be left in an unusable state.  So just
disconnect on all exceptions instead.

16 years agoTODO.txt: removing pre- and post-release sections
J. Alexander Treuman [Thu, 3 Apr 2008 03:55:07 +0000 (23:55 -0400)]
TODO.txt: removing pre- and post-release sections

16 years agompd.py: changing exception raising to comply with the Python Style Guide
J. Alexander Treuman [Sun, 23 Mar 2008 21:20:46 +0000 (17:20 -0400)]
mpd.py: changing exception raising to comply with the Python Style Guide

16 years agompd.py: strip trailing \n from MPD's hello line for a nicer error message
J. Alexander Treuman [Sun, 23 Mar 2008 21:10:41 +0000 (17:10 -0400)]
mpd.py: strip trailing \n from MPD's hello line for a nicer error message

16 years agompd.py: reset to disconnected state if _hello() fails in connect()
J. Alexander Treuman [Sun, 23 Mar 2008 21:07:55 +0000 (17:07 -0400)]
mpd.py: reset to disconnected state if _hello() fails in connect()

16 years agoTODO.txt: removing completed TODO item
J. Alexander Treuman [Sun, 23 Mar 2008 20:51:48 +0000 (16:51 -0400)]
TODO.txt: removing completed TODO item

16 years agoCHANGES.txt: document change in previous commit
J. Alexander Treuman [Sun, 23 Mar 2008 20:50:49 +0000 (16:50 -0400)]
CHANGES.txt: document change in previous commit

16 years agompd.py: loop over addresses returned by getaddrinfo to connect to
J. Alexander Treuman [Sun, 23 Mar 2008 20:47:06 +0000 (16:47 -0400)]
mpd.py: loop over addresses returned by getaddrinfo to connect to

This allows us to support IPv6 and multi-homed hostnames.  getaddrinfo is
called with the same flags as libmpdclient uses, making address resolution
consistent between the two.