Commit graph

9849 commits

Author SHA1 Message Date
Carl Suster
0a7c5cb163 Prepare changelog for 1.4.8 2019-04-23 12:26:36 +10:00
Rainer Hihn
a60935ed1c Prevent scientific notation 2019-04-22 19:50:11 +02:00
Adrian Sampson
4d55e6dfbb Add changelog link for #3220 (fix #3219) 2019-04-21 20:41:18 -04:00
Adrian Sampson
8b23411767 Simplify docs for #3220 2019-04-21 20:40:18 -04:00
Adrian Sampson
5f9b28124d Merge pull request #3220 from rain0r/3219
Update __init__.py
2019-04-21 20:39:46 -04:00
Rainer Hihn
b7d3ef6274 - Improved doc and changelog
- Cleaner implementation of mutual excursion of the command line
arguments.
2019-04-21 18:32:41 +02:00
Adrian Sampson
84c29d0275
Merge pull request #3226 from jackwilsdon/loadext
Add loadext plugin
2019-04-21 12:22:49 -04:00
Jack Wilsdon
f5f9aed641
Add loadext plugin 2019-04-21 15:10:28 +01:00
Jack Wilsdon
b08db06c05
Add load_extension method for loading SQLite extensions 2019-04-21 01:30:50 +01:00
Carl Suster
063e4f259b
Merge pull request #3222 from arcresu/bpd-decoders
bpd: support decoders command
2019-04-21 09:20:42 +10:00
Adrian Sampson
0f8a748ade
Merge pull request #3227 from arcresu/doc-plugin-listen
docs: remove reference to BeetsPlugin.listen
2019-04-20 14:49:44 -04:00
Adrian Sampson
1edd21fab1
Merge pull request #3223 from arcresu/mpd-port
mpdupdate, mpdstats: use MPD_PORT env variable
2019-04-20 14:21:20 -04:00
Carl Suster
d5507dc956 docs: remove reference to BeetsPlugin.listen
This decorator was removed in 4578c4f0e1 and now
`BeetsPlugin.register_listener` should be used instead. Fixes #2885.
2019-04-20 18:13:28 +10:00
Carl Suster
bdc053d14b Changelog for #3225 2019-04-20 17:29:43 +10:00
Carl Suster
f9633edf3b
Merge pull request #3225 from sbraz/safe_load
Replace more instances of unsafe calls to yaml.load
2019-04-20 17:24:40 +10:00
Louis Sautier
4d98088cc1
Replace more instances of unsafe calls to yaml.load 2019-04-20 01:14:15 +02:00
Rainer Hihn
ddd7b4b3b4 Removed empty line 2019-04-19 21:17:15 +02:00
Rainer Hihn
5c643a8f16 Removed ipdb import 2019-04-19 21:08:26 +02:00
Rainer Hihn
e4b2e7b476 Made -a and -A mutually exclusive. 2019-04-19 20:58:13 +02:00
Carl Suster
869d6b280f Changelog for #3223 2019-04-19 17:35:42 +10:00
Carl Suster
21cba304bd mpdupdate: use MPD_PORT env variable 2019-04-19 17:35:42 +10:00
Carl Suster
dc5f110844 mpdstats: use MPD_PORT env variable 2019-04-19 17:35:42 +10:00
Carl Suster
c9327511f6 Changelog for #3222 2019-04-19 16:21:52 +10:00
Carl Suster
3da23167ca bpd: support decoders command
This uses GStreamer APIs to extract a list of audio decoders and the
relevant MIME types and file extensions. Some clients like ncmpcpp use
this command to fetch a list of supported file extensions.
2019-04-19 16:08:05 +10:00
Rainer Hihn
0b2334f8e8 Added command line options to query explicit for albums and / or tracks. 2019-04-18 22:31:49 +02:00
rain0r
fc95fb86a1
Update __init__.py
Also fetch genres for single tracks via query.
2019-04-17 20:57:58 +02:00
Carl Suster
7b910c3fde
Merge pull request #3215 from arcresu/bpd-compat
bpd: support short form of list command for albums
2019-04-15 13:39:23 +10:00
Carl Suster
7ddde2a10c Changelog for #3215 2019-04-15 13:25:02 +10:00
Carl Suster
9182f18e6f bpd: support short form of list command for albums
Some clients list the albums belonging to an artist by issuing the
command `list album <ARTIST NAME>`. This change inserts the tag `artist`
before the artist name so that this succeeds. Fixes #3007
2019-04-15 13:25:02 +10:00
Adrian Sampson
818f5bd07b
Merge pull request #3205 from arcresu/bpd-idle
bpd: support idle command and with it MPD 0.14
2019-04-11 09:42:02 -04:00
Carl Suster
241e23eae8 bpd: document new control_port config 2019-04-10 15:54:41 +10:00
Carl Suster
826244777e bpd: minor control socket refactor 2019-04-10 15:52:47 +10:00
Carl Suster
d55f061f0b bpd: add control socket
A new `ControlConnection` is created each time a client connects over
a new control socket. This is used to forward events from the player,
and also for debugging utilities that are not part of the real MPD
protocol.

This new feature reuses as much infrastructure from the normal protocol
handling as possible (e.g. `Command` for parsing messages). While the
normal connection delegates to server `cmd_*` methods which are string
generators, the control connections delegate to `ctrl_*` methods defined
on the connection itself that are full coroutines.
2019-04-09 12:19:15 +10:00
Carl Suster
fa3813844c bpd: reimplement idle without polling 2019-04-08 16:33:34 +10:00
Carl Suster
e70b2134e4 bpd: update documentation 2019-04-08 11:40:24 +10:00
Carl Suster
275301750a Changelog for #3205 2019-04-08 11:40:24 +10:00
Carl Suster
6fbf3853f2 bpd: bump protocol version to 0.14.0 2019-04-08 11:40:24 +10:00
Carl Suster
d05ca2c2b0 bpd: add tests for idle command 2019-04-08 11:40:24 +10:00
Carl Suster
699de94f4f bpd: send all relevant idle events 2019-04-08 11:40:24 +10:00
Carl Suster
7105c800aa bpd: implement the idle command
Getting this command puts the connection into a special mode where it
awaits MPD events (like the player changing state or the playlist
changing due to other clients interacting with the server.

The MPD specification states that events should queue while a client is
connected, and when it issues the `idle` command any matching events
should be sent immediately if there are any, or as soon as they happen
otherwise.
2019-04-08 11:40:24 +10:00
Carl Suster
ee0c31ba6a bpd: track and log client session details
Keep track of a list of currently-connected clients.

Use `socket.getpeername()` to get an identifier for each connection and
include this in each log message. This function is documented as not
being available on all systems, but it's unclear which systems this
involves.

Also log a message on client connect and disconnect events. If the
disconnection reason is because the client sent a blank line, match MPD
by returning a protocol error then hanging up. Escape curly braces.
2019-04-08 11:28:56 +10:00
Carl Suster
5b0a02eb31 bpd: don't send volume if zero in status 2019-04-08 10:52:15 +10:00
Carl Suster
f8a2c22e8d bpd: fix typo in comment 2019-04-08 10:52:15 +10:00
Carl Suster
bb1613694b
Merge pull request #3209 from arcresu/prune_dirs-except
Catch OSError in prune_dirs helper
2019-04-08 09:47:38 +10:00
Adrian Sampson
362722c87c
Merge pull request #3206 from arcresu/random-util
random: move functionality into beets.random
2019-04-07 11:59:39 -04:00
Carl Suster
9147fabb97 random: beets.util.random -> beets.random 2019-04-07 18:46:11 +10:00
Carl Suster
df5579d4a8
Merge pull request #3210 from gdtwst/mpdstats_quickfix
mpdstats: Re-add fixes from #2707
2019-04-07 18:00:18 +10:00
Carl Suster
27599410e8 Changelog for #3209 2019-04-07 16:39:28 +10:00
Jack Wilson
dc897c0bb9 Catch OSError in prune_dirs
Since `fnmatch_all` can raise `OSError`s, and we were already silently
giving up in `prune_dirs` on some of these exception, just do more of
the same.
2019-04-07 16:31:21 +10:00
gdtwst
c41197cc5c Re-add fixes from #2707 2019-04-07 10:07:38 +07:00