Serene-Arc
a6e5201ff3
Apply formatting tools to all files
...
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Andrew Rogl
ee4268dabb
Remove unused imports
...
Fix imports
Fix formatting
2021-08-26 20:59:48 +10:00
Andrew Rogl
1ec87a3bdd
pyupgrade beetsplug and tests
...
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Carl Suster
21cba304bd
mpdupdate: use MPD_PORT env variable
2019-04-19 17:35:42 +10:00
Adrian Sampson
2706339a83
Fix #2381 : mpdupdate on Python 3
...
Communicate bytes over the socket, obvi.
2017-01-10 12:22:30 -05:00
Thiago de Arruda
9963fd0432
mpdupdate: Support $MPD_HOST environment variable.
...
This environment variable is also used by mpc. See
http://linux.die.net/man/1/mpc for details.
2016-08-26 11:36:39 -03:00
Adrian Sampson
5efd5b21c5
Use new as_str method
...
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Johnny Robeson
e8afcbe7ec
replace unicode with six.text_type
2016-06-24 05:53:49 -04:00
Adrian Sampson
e54c7eec3d
Standardize __future__ imports without parentheses
...
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
feab3df910
Removed import of unicode_literals from plugins
...
* mpdstats
* mpdupdate
* permissions
* zero
2016-02-20 14:12:37 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Peter Kessen
3eb8008b11
added encoding as comment in files
...
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
David Logie
85ffe444dc
mpdupdate: Improve error message
...
When beets can't connect to mpd, display the underlying error instead of
dying with an ugly exception.
2015-06-05 11:45:38 +01:00
Adrian Sampson
07516b2bca
Redact some passwords in plugins
2015-03-27 22:42:28 -04:00
Bruno Cauet
4bfa439ee1
database_change: send model that changed
2015-03-16 14:32:37 +01:00
Bruno Cauet
a5026100a3
All plugins use unicode_literals
...
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +01:00
Bruno Cauet
90b388b775
Use __future__ imports but unicode_literals everywhere
...
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
ca91bc8920
mpdupdate: fix indent
2015-01-13 18:53:30 +01:00
Bruno Cauet
de86b9b570
Clean MPDupdate plugin
...
- no global variable
- use logging instead of prints
- unicode logging
2015-01-13 12:30:40 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48
Happy 2015. ;)
...
See 7a410f636b
Command used:
git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Fabrice Laporte
3ead936fe5
flake8 cleaning beetsplug/*
...
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Adrian Sampson
d30db10d10
mpdupdate: remove debug clause
...
Thanks to @phmongeau for pointing out this embarrassing mistake.
2014-01-08 22:43:10 -08:00
Adrian Sampson
0167f67a96
simplify MPD configuration
2013-11-25 22:45:42 -08:00
Peter Schnebel
ac0f62eaf1
proposal for one global 'mpd' config section
2013-10-31 21:03:11 +01:00
Johann Klähn
5414dc80d2
allow and expand home directory in mpdupdate socket
...
This allows you to use a socket in your home directory (e.g.
`~/.mpd/socket`) without having to specify the full path including the
username (which can change from machine to machine).
2013-09-23 21:47:26 +02:00
John Hawthorn
1bf8ae0a01
mpdupdate: Allow UNIX domain socket for MPD server
...
If the host configuration begins with a '/', it is assumed to reference
a UNIX domain socket. This is similar to libmpdclient's behaviour.
2013-06-05 13:20:27 -07:00
Dang Mai
d4004f10fa
Update comments to reflect config migration
2013-01-31 18:17:00 -05:00
Dang Mai
ef8ef4c747
Update MPD whenever database changes
2013-01-31 18:16:21 -05:00
Adrian Sampson
7a410f636b
happy new year ✨
...
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
6d68a4855e
per-plugin configuration defaults in __init__()
...
This uses the new BeetsPlugin.config convenience view heavily. Things are
slowly getting less verbose.
2012-12-18 22:35:44 -08:00
Adrian Sampson
3ef9e006f4
finish confit-ifying all the plugins
2012-12-13 17:14:19 -08:00
Philippe Mongeau
9824cee7fb
add the 'path' argument to mpdupdate plugin
2012-05-17 12:31:19 -04:00
Adrian Sampson
429af42e14
use print_function __future__ import
...
All code should now use Python 3-style "print"s.
2012-05-13 21:08:27 -07:00
Adrian Sampson
b68e87b92c
The Great Trailing Whitespace Purge of 2012
...
What can I say? I used to use TextMate!
2012-05-13 20:22:17 -07:00
Adrian Sampson
a28f930c52
transaction objects to control DB access
...
In an attempt to finally address the longstanding SQLite locking issues, I'm
introducing a way to explicitly, lexically scope transactions. The Transaction
class is a context manager that always fully fetches after SELECTs and
automatically commits on exit. No direct access to the library is allowed, so
all changes will eventually be committed and all queries will be completed. This
will also provide a debugging mechanism to show where concurrent transactions
are beginning and ending.
To support composition (transaction reentrancy), an internal, per-Library stack
of transactions is maintained. Commits only happen when the outermost
transaction exits. This means that, while it's possible to introduce atomicity
bugs by invoking Library methods outside of a transaction, you can conveniently
call them *without* a currently-active transaction to get a single atomic
action.
Note that this "transaction stack" concepts assumes a single Library object per
thread. Because we need to duplicate Library objects for concurrent access due
to sqlite3 limitation already, this is fine for now. Later, the interface should
provide one transaction stack per thread for shared Library objects.
2012-05-06 23:24:05 -07:00
Adrian Sampson
ed89394368
mpdupdate plugin (and config system for plugins)
2010-09-21 10:40:39 -07:00