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