Carl Suster
b4c4f3ca19
bpd: use plugin logger instead of global logger
2019-03-31 22:06:43 +11:00
Carl Suster
7557bb06d6
bpd: use log instead of stdout
2019-03-31 18:43:18 +11:00
Adrian Sampson
958ad430fc
bpd: Use integers for time values (fix 2394)
2017-01-17 11:37:10 -08:00
Adrian Sampson
a063336446
Fix #2332 : Unicode trouble in bpd
2016-12-20 15:16:46 -05:00
Johnny Robeson
7a2bdf502f
s/utf8/utf-8/ in all encoding/decoding contexts
...
This matches up with the python documentation.
2016-09-06 23:10:24 -04:00
Adrian Sampson
58afaf07a5
Switch to new noqa syntax for flake8 3.0
...
Apparently, `# noqa ignore=X` worked before, but now the syntax is more terse,
like this: `# noqa: X`.
See the changelog here:
http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
2016-07-25 15:02:10 -04:00
Johnny Robeson
a1edf1928d
treat bpd command and args as strings, not bytes
2016-07-10 19:21:52 -04:00
Johnny Robeson
cb6efc4c22
Reorganize Gst import and version req in bpd
...
This avoids
```sh
PyGIWarning: Gst was imported without specifying a version first. Use
gi.require_version('Gst', '1.0') before import to ensure that the right
version gets loaded.
```
by silencing E401 import ordering warning
2016-07-08 05:48:26 -04: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
Adrian Sampson
e16cc58cb9
Walk back some six.iter* uses
...
In places where it doesn't much matter whether we use an iterator or the old
Python 2 list way, using the six name just hurts legibility.
2016-06-25 18:29:55 -07:00
Johnny Robeson
edb1cbc5fc
replace iter{items|values} with six.iter{items|values}
2016-06-24 05:53:55 -04:00
Johnny Robeson
e57b7faf69
replace basestring with six.text_types
2016-06-24 05:53:55 -04:00
Johnny Robeson
e8afcbe7ec
replace unicode with six.text_type
2016-06-24 05:53:49 -04:00
Johnny Robeson
4649226b9b
use urllib from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
1f8fe0f9a6
use _thread from six.moves
2016-06-23 04:40:18 -04:00
Philipp Beckmann
f9ed53a096
Multiple corrections as advised in the codereview
2016-06-20 18:44:37 +02:00
Philipp Beckmann
7b154cedd7
Added double line spacings between definitions
2016-06-20 18:29:46 +02:00
Philipp Beckmann
9fd227c8cc
Fixed flake8 errors
2016-06-20 18:22:07 +02:00
Philipp Beckmann
5613d9d4ea
bpd: Added correct error check for query_position/query_duration
2016-06-20 18:09:37 +02:00
Philipp Beckmann
0917e675d7
bpg: Converted gstplayer.py to GStreamer 1.0
2016-06-19 22:06:55 +02:00
Adrian Sampson
71b9fd785c
Revert "Do __name__ comparison with bytes and not unicode"
...
This reverts commit 9c41c39913 .
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07: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
5db57bdc01
Removed unicode_literals from plugin bpd
2016-02-20 11:57:36 +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
Adrian Sampson
90178ab380
Always log a template literal ( fix #1481 )
...
Otherwise, we risk the user-provided string looking like a format string! If
it contains curly braces, it can behave unexpectedly.
2015-05-28 23:44:41 -04:00
Adrian Sampson
8ae0317014
bpd: Process commands as bytes ( fix #1388 )
2015-03-31 07:13:13 -05:00
Adrian Sampson
07516b2bca
Redact some passwords in plugins
2015-03-27 22:42:28 -04:00
Adrian Sampson
e7f8a627e9
Style fixes for pep8 1.6
2015-02-07 12:51:54 -08: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
02d8e88ef1
Replace all mentions of 'str' with 'bytes'
2015-01-20 12:48:15 +01:00
Bruno Cauet
9c41c39913
Do __name__ comparison with bytes and not unicode
2015-01-20 12:03:57 +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
b27c5304d1
Merge branch 'master' into logging
...
Conflicts:
beetsplug/fetchart.py
beetsplug/mpdstats.py
2015-01-09 15:15:27 +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
Bruno Cauet
23e6760e19
Partial rollback of bpd logging
2015-01-08 17:55:40 +01:00
Bruno Cauet
74e18afa94
Convert bdp: pass around with static setter on classes
2015-01-06 21:42:09 +01:00
Bruno Cauet
b8211a3c4c
Every plugin uses its own logger
...
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01:00
Bruno Cauet
30f158a95e
Move "from beets import logging" statements
...
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
7df8bef8b7
Update logging imports: logging → beets.logging
2015-01-04 17:02:27 +01:00
Ralf Sieger
ab5c5dcfd5
added option for initial volume setting
2014-09-30 09:34:04 +02:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f
Clean up of logging messages as described here
...
All logging now prefers the ' (single quote) over the " (double quote)
https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Adrian Sampson
e5a9db1cac
fix up some indentation warnings in plugins
2014-04-13 17:55:49 -07:00
Fabrice Laporte
3ead936fe5
flake8 cleaning beetsplug/*
...
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Thomas Scholtes
f6f974ec87
Remove ITEM_* constants
...
We might consider renaming `Item._fields` to `Item.fields` since other parts of
beets use it as a replacement for `ITEM_KEYS`.
See also #650 .
2014-04-10 17:11:21 +02:00
Thomas Scholtes
4b1a1e3d65
Remove ITEM_KEYS_WRITABLE
2014-04-04 00:03:40 +02:00
Adrian Sampson
9ee4adc5e1
move remaining generic Query types to dbcore.query
...
NumericQuery is still broken. This, of course, is the whole reason for the
change.
2014-01-20 16:40:50 -08:00
Adrian Sampson
cbbb38c417
new BytesQuery factors out MatchQuery's path logic
2014-01-13 16:17:30 -08:00
Adrian Sampson
c5032f925e
move Destination method to Item class
2013-09-17 09:09:10 -07:00
Adrian Sampson
ec10f8c223
remove count() calls
...
I removed this method in an earlier commit.
2013-08-20 14:28:28 -07:00
Simon Chopin
e30f8f8fb9
bpd: Use AnyFieldQuery when searching "any" fields
...
BPD hadn't been ported when AnySubstringQuery was removed, resulting in
crash, death and horror when using the search function.
2013-07-02 11:00:10 +02:00
Adrian Sampson
89689899c9
changelog note and indentation fix for #86
2013-02-02 12:27:42 -08:00
steini
476adf40af
Support for AlbumArtist and AlbumArtistSort tag listings.
2013-02-01 02:35:19 +00: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
4a5594bec6
begin adding convenient plugin defaults
...
We need plugins to set their config values at run time instead of module import
time. That is, defaults should be put in the __init__ method. This is easy
enough, but to make it even more convenient, I added a BeetsPlugin.config
field, which is a Confit view into a subsection of the configuration named
after the plugin.
2012-12-18 20:42:42 -08:00
Adrian Sampson
6c94358b13
begin Confit-ifying plugins in alphabetical order
2012-12-13 12:31:10 -08:00
Adrian Sampson
7158c01ff8
clean up outdated FIXMEs
2012-10-27 18:47:04 -07:00
Adrian Sampson
749b19955e
bpd: use pygst.require() before importing gst
...
A user reports that this fixes BPD on OS X.
2012-09-12 17:57:37 -07:00
Adrian Sampson
26fa3bcac6
remove outdated call in BPD
2012-07-24 14:26:47 -07:00
Adrian Sampson
e634b95996
Merge pull request #40 from djrtl/upstream
...
Fixed an issue with a readline from socket in bpd
2012-06-03 22:53:57 -07:00
Matteo Mecucci
469fb95e3e
Added a second check for empty line in bpd after my latest change
2012-06-03 22:07:16 +02:00
Matteo Mecucci
df25de89f7
Fixed an issue with a readline from socket in bpd
2012-06-03 11:40:57 +02:00
Adrian Sampson
d82d74b422
move bluelet to util subpackage
...
This way, it can be shared among multiple plugins (as could happen
eventually...)
2012-05-13 21:22:50 -07:00
Adrian Sampson
760fff3ace
use new "except ... as ...:" syntax
...
This replaces the older "except ..., ...:" syntax.
2012-05-13 21:18:50 -07: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
Matteo Mecucci
030c656a75
Added support for random and repeat in the bpd plugin.
2012-05-08 22:53:17 +02: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
fa3e41c86a
BPD: print messages reflecting tree (re)build
2012-04-30 12:02:00 -07:00
Matteo Mecucci
43cebabcb6
Added sorting in listing command of bpd
2012-04-15 17:05:16 +02:00
Adrian Sampson
22e8695172
BPD: use playbin2 instead of playbin ( #364 )
2012-03-21 14:25:01 -07:00
Simon Chopin
52a34c7510
Fix the list command in BPD
...
The cmd_list method wasn't a generator as run() expected, but instead
loaded directly the data onto the connection withoutactually sending it.
2012-02-17 20:15:25 +01:00
Adrian Sampson
fed9e206c0
sync with latest bluelet version (824609773a85)
2011-12-14 14:11:49 -08:00
Adrian Sampson
59b4338f81
fix BPD lsinfo results for libmpc ( #277 )
2011-12-14 14:04:00 -08:00
Adrian Sampson
f48fefdf61
merge
2011-09-18 15:39:38 -07:00
Adrian Sampson
6fbe69d454
spelling errors in comments
2011-09-18 13:00:36 -07:00
Adrian Sampson
9d1870af16
fix reference to old greenlet client
2011-09-05 13:06:01 -07:00
Adrian Sampson
7310e9ea10
fix playlist versioning & directory recursion in BPD
2011-05-07 12:08:13 -07:00
Adrian Sampson
e5e11503ad
a couple more cursor closings
2011-05-05 18:26:29 -07:00
Adrian Sampson
8341dee3ab
reorder items() and albums() parameters to reflect common use
2011-05-05 17:20:24 -07:00
Adrian Sampson
3e90579a6c
BPD uses new VFS as a backend ( #131 )
2011-05-05 17:00:05 -07:00
Adrian Sampson
30080bc520
fix memory leak in bluelet, syncing with latest source ( #151 )
2011-04-21 21:40:28 -07:00
Adrian Sampson
2c81b40952
make bluelet resilient to "broken pipe" errors (client disconnects)
2011-04-21 20:50:26 -07:00
Adrian Sampson
072680e894
"profile" command in BPD for memory debugging
2011-04-21 20:31:44 -07:00
Adrian Sampson
a1996472e8
close gstreamer pipeline after each track
...
(*maybe* addressing BPD memory leak)
2011-04-20 10:34:44 -07:00
Adrian Sampson
bb8ebd24b0
fix adding tracks in BPD
2011-04-09 10:44:56 -07:00
Adrian Sampson
5f993a0bfe
BPD now lists albumartists instead of artists, works with VA releases
2011-04-02 18:49:15 -07:00
Adrian Sampson
945e253c2f
fix artist field in BPD file browser
2011-02-07 19:47:23 -08:00
Adrian Sampson
20fe707a09
change BPD browser to use albumartist instead of artist
2011-01-24 16:08:04 -08:00
Adrian Sampson
2ed72f796a
preliminary replacement of eventlet with my own bluelet library in BPD
2011-01-02 18:46:03 -08:00
Adrian Sampson
c885b7b2b5
use logging a bit more instead of print_
2010-09-28 10:40:44 -07:00
Adrian Sampson
4adb76bb65
fix parsing of escaped characters in MPD commands
2010-09-16 23:06:33 -07:00
Adrian Sampson
514d1bc706
fixed silly error when listing tracks in BPD
2010-08-09 21:57:06 -07:00
Adrian Sampson
6754155c71
Albums now have an internal cache of their values
...
This makes way more sense than fetching every metadata request from the
database. The performance of "beet ls -a" and the like should be drastically
better.
2010-07-21 16:04:59 -07:00
Adrian Sampson
cc3ec0d8aa
albums() browse function now returns Album objects
...
As part of this, the BaseLibrary class was also adapted to include a notion of
albums. This is reflected by the new BaseAlbum class, which the Album class
(formerly _AlbumInfo) completely replaces in the concrete Library. The BaseAlbum
class just fetches metadata from the underlying items.
2010-07-21 15:02:08 -07:00
Adrian Sampson
f8c317a2cd
undefined variable reported by pylint
2010-07-09 18:16:40 -07:00
Adrian Sampson
6e90009b07
remove outdated references to beets.player module
2010-07-09 18:12:18 -07:00
Adrian Sampson
8ccc8e1ccd
move bpd and dadd commands to plugins
...
--HG--
rename : beets/player/bpd.py => beetsplug/bpd/__init__.py
rename : beets/player/gstplayer.py => beetsplug/bpd/gstplayer.py
rename : beets/device.py => beetsplug/device.py
2010-07-08 17:09:07 -07:00