Commit graph

3247 commits

Author SHA1 Message Date
Adrian Sampson
6b000983c3 merge echonest_tempo fix from master 2012-12-23 14:34:08 -08:00
Adrian Sampson
1809de1500 GH-71: changelog note & retry limit 2012-12-21 23:10:30 -08:00
Zach Denton
e332940247 Wait when Echo Nest API rate limit is exceeded. 2012-12-22 06:31:23 +01:00
Adrian Sampson
a23b685747 use Confit's as_str_seq() instead of get(list)
This validator lets the user write either a real list, like [a, b, c], or just
a whitespace-separated string, like a b c. This is a little nicer for some
settings like "plugins" where the brackets and commas just look like line
noise.
2012-12-20 17:03:51 -08:00
Adrian Sampson
fbcd1d1c18 merge fixes from master 2012-12-19 12:22:23 -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
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
55cac36d35 sync with latest confit
This includes Confit's shift to using OrderedDict, which needs some debugging.
2012-12-18 20:03:52 -08:00
Adrian Sampson
0c49db0f11 fetchart: fix exception when source returns None 2012-12-17 23:22:45 -08:00
Adrian Sampson
3a0ac96cc5 zero: Unicode logging calls 2012-12-17 15:08:48 -08:00
Adrian Sampson
582851a6fe merge fix from master 2012-12-14 12:57:40 -08:00
Adrian Sampson
4222b37bc2 convert: fix processing singletons w/ "embed" on 2012-12-14 12:38:46 -08:00
Adrian Sampson
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
6c94358b13 begin Confit-ifying plugins in alphabetical order 2012-12-13 12:31:10 -08:00
Adrian Sampson
e17cd6beba merge lots of work on the stable branch 2012-12-12 19:14:30 -08:00
Adrian Sampson
2d4b91fa6d replaygain: handle RG tool invocation errors (GC-469) 2012-12-11 13:09:10 -08:00
Adrian Sampson
531025f799 replaygain: restrict file formats (GC-469) 2012-12-11 13:06:57 -08:00
Adrian Sampson
3e9135ee7c syspath-ify call to pyacoustid (GC-464) 2012-12-07 14:49:11 -08:00
Adrian Sampson
f5628e03f6 include official beets Echo Nest API key 2012-12-02 16:32:19 -08:00
Adrian Sampson
a8cf42d05b echonest_tempo: changelog + doc fixes + print fix 2012-12-02 16:25:45 -08:00
David Brenner
0fe2331842 Create echonest_tempo plugin - use EchoNest API to get tempo (bpm).
A simple plugin that connects to the EchoNest API to retrieve
tempo (bpm) metadata for tracks. Functions similarly to the lyrics
plugin.

Requires the pyechonest library.
2012-12-02 18:27:20 -05:00
Adrian Sampson
ad9021b9d9 replaygain: normalize peaks to 2^15 (closes #65) 2012-11-09 16:25:19 -08:00
Adrian Sampson
729a89cff3 lyrics: possibly address a Unicode error 2012-11-09 00:01:36 -08:00
Adrian Sampson
ffe5d37d78 log unicode string literals (GC-456) 2012-11-06 14:22:36 -08:00
Jakob Schnitzer
19acf0809f convert: switch from flac and lame to ffmpeg
Instead of flac and lame the convert plugin now uses ffmpeg. This adds
support for more input formats and simplifies the code. ffmpeg also uses
the lame encoder internally and has equivalents of all the -V<num>
presets which should be sufficient.
2012-11-05 22:30:21 +01:00
Adrian Sampson
a8383b03e9 merge with master 2012-11-01 14:28:25 -07:00
Adrian Sampson
338eb6388e documentation for convert.exe problem (#64)
We currently just document the fact that convert.exe can interfere with finding
ImageMagick's convert binary. We can solve this with a config option easily once
confit is merged.

This also changes the line endings for fetchart.rst back to Unix.
2012-11-01 14:25:46 -07:00
Adrian Sampson
d9974081a7 add extension for proxied images
`urllib.urlretrieve` was using the correct extension in most cases -- I think
when the URL ended with .jpg -- but not in every case. This was leading to files
named just "cover" and not "cover.jpg" or something else sensible. In
particular, proxied URLs don't have .jpg extensions. This generates the filename
manually so the source image always has an extension.
2012-11-01 12:39:02 -07:00
Adrian Sampson
45650a4b64 artresizer: fix argument lists to helper functions
Also added some useful debug logs.
2012-11-01 12:15:51 -07:00
Adrian Sampson
f4fa11f8ca don't use subprocess.check_output
This function was added in Python 2.7 and we're currently targetting 2.6 as a
minimum version. Replaced with a function in util.
2012-11-01 11:59:02 -07:00
Adrian Sampson
07d3f3e066 lazily initialize ArtResizer singleton (#64)
Searching for `convert` or PIL has non-negligible performance overhead, so it's
preferable to only do it when really necessary. This way, the search is only
performed when ArtResizer.shared is accessed for the first time.
2012-11-01 11:40:53 -07:00
Adrian Sampson
f7677a4b56 fetchart: fix command & use maxwidth (#64)
An earlier commit broke the call to art_for_album here (too few arguments).
I've also now propagated the maxwidth setting for the command to match the
import hook.
2012-11-01 00:19:15 -07:00
Adrian Sampson
e3fe9712d5 fetchart fixes for image resizing (#64)
Fixed a number of issues with the changes to fetchart:
- Remove redundant fetches. This was making the Amazon source download every
  image twice even when art resizing was not enabled!
- Restore local_only switch in plugin hook, which got lost in the shuffle at
  some point.
- Don't replace the original image file in-place; use a temporary file instead.
  This would clobber the original source image on the filesystem with the
  downscaled version!
2012-11-01 00:09:35 -07:00
Adrian Sampson
3873c29448 artresizer (#64): helper functions, not classes
The previous method was to change self.__class__ dynamically to make __init__
instantiate different classes. This new way, which uses bare functions instead
of separate functor-like classes, instead just forwards the resize() call to
a module-global implementation based on self.method.

Additionally, the semantics of ArtResizer have changed. Clients now *always*
call resize() and proxy_url(), regardless of method. The method makes *one* of
these a no-op. This way, clients need not manually inspect which method is
being used.
2012-10-31 23:33:59 -07:00
Fabrice Laporte
447454a62c fix few errors revealed by test_art.py 2012-10-28 23:02:45 +01:00
Fabrice Laporte
d271735dd2 fetchart: fix urlopen call 2012-10-28 17:09:39 +01:00
Fabrice Laporte
7f2aa44ac6 Add 'maxwidth' option to embedart and fetchart plugins.
artresizer.py instances an ArtResizer object that uses internally the PIL; ImageMagick
or a web proxy service to perform the resizing operations.
Because embedart works on input images located on filesystem it requires PIL or ImageMagick, whereas
fetchart is able to do the job with the fallback webproxy resizer.
2012-10-28 15:36:42 +01:00
Adrian Sampson
7158c01ff8 clean up outdated FIXMEs 2012-10-27 18:47:04 -07:00
Adrian Sampson
57e66d7b1a fetchart: sort image filenames (GC-452) 2012-10-25 18:02:22 -07:00
Jakob Schnitzer
cf98bfcbe6 convert: write tags from library to copied files 2012-10-25 01:05:06 +02:00
Adrian Sampson
02fd9bf809 convert: embed into destination file, not source file
Paging @yagebu: I think the old version of the code would embed album art into
the wrong file. Please correct me (and accept my apologies) if I'm wrong
though.
2012-10-24 15:17:00 -07:00
Adrian Sampson
dcb9ad7373 fix several non-unicode logging statements
A user reported a problem with one of the logging statements where .format()
tried to convert a Unicode string to bytes because the log message was '', not
u''. As a rule, we should ensure that all logging statements use Unicode
literals.
2012-10-24 15:14:33 -07:00
Philippe Mongeau
78f2003eb0 simplify the random print code
We don't need the 'if opts.album' since we print with the same function and
argsuments.
2012-10-21 11:39:23 -04:00
Philippe Mongeau
e80dce6930 fuzzy: use the new print_obj function 2012-10-21 11:29:21 -04:00
Jakob Schnitzer
54f29812cf convert: fix breakage due to recent API changes 2012-10-21 13:35:41 +02:00
Adrian Sampson
91ad913399 #62: simplify list (and random) code
With the new centralized print_obj function, we can greatly simplify the code
for the list command. This necessitated a couple of additional tweaks:

- For performance reasons, print_obj can now take a compiled template. (There's
  still an issue with using the default/configured template, but we can cross
  that bridge later).
- When listing albums, $path now expands to the album's item dir. So the format
  string '$path' now exactly corresponds to passing the -p switch.

As an added bonus, we can now also reduce copypasta in the random plugin (which
behaves almost exactly the same as list).
2012-10-20 21:10:39 -07:00
Adrian Sampson
9368075756 replaygain: reinstate albumgain config option 2012-10-20 16:49:52 -07:00
Adrian Sampson
848b56e54c replaygain: remove album noclip gain adjustment
as suggested by @kraYmer
2012-10-20 16:41:31 -07:00
Jakob Schnitzer
492f168124 convert: Fix problem with "threads" config option 2012-10-20 13:25:25 +02:00
Adrian Sampson
2c38c15fb8 replaygain: apply album gain in album mode 2012-10-18 11:33:13 -07:00
Jakob Schnitzer
58ba4b3d75 convert: fix album art embedding 2012-10-18 18:35:25 +02:00
Adrian Sampson
0ab3426bd9 replaygain: add command
You can now disable automatic analysis and instead use a command to manually
analyze albums or tracks.
2012-10-17 22:12:38 -07:00
Adrian Sampson
1a261db918 replaygain: style and light refactoring 2012-10-17 21:47:17 -07:00
Adrian Sampson
95910a366b replaygain: run in import stage
This is the "new way" to post-process files on import (superseding the imported
events).
2012-10-17 21:43:27 -07:00
Adrian Sampson
3a4e1ca4f7 replaygain: add fields to Item
This has been a long time coming, but we now finally keep track of ReplayGain
values in the database. This is an intermediate step toward a refactoring of the
RG plugin; at the moment, these values are not actually saved!
2012-10-17 20:28:24 -07:00
Adrian Sampson
83f3069d57 replaygain: remove albumgain setting
We now always calculate album gain when importing an album. This is "free" (no
performance cost) now and players are free to ignore the setting if they so
choose.
2012-10-17 20:11:20 -07:00
Adrian Sampson
3d68cf5deb replaygain: fix album nopeak adjustment
Removed the second tool invocation. We now adjust the album-level gain based on
track peaks in one fell swoop. Based on help from Fabrice via email.
2012-10-17 20:06:10 -07:00
Adrian Sampson
ce190fbe3b merge 2012-10-17 19:47:31 -07:00
Jakob Schnitzer
26dfe38bb0 convert: Write tags from library instead of copying them 2012-10-17 21:12:31 +02:00
Adrian Sampson
cc8ead7e34 convert: atomic mkdirall() call 2012-10-15 19:53:17 -07:00
Adrian Sampson
6115fba765 replaygain: calculate when any file needs calculation
This ensures accurate album-level data. It also fixes a problem with the old way
of doing things where the MediaFiles and tool results would become misaligned if
a subset of the tracks needed recalculation.
2012-10-15 14:54:06 -07:00
Adrian Sampson
672ac78e76 replaygain: write album-level tags 2012-10-15 14:42:28 -07:00
Adrian Sampson
9afaed534c refactor output parsing code to use a dictionary 2012-10-15 14:31:31 -07:00
Adrian Sampson
8de8777b7e replaygain: use log messages instead of prints 2012-10-15 12:19:14 -07:00
Adrian Sampson
4adc896a86 replaygain: consolidate command invocation code
Invocations of the mp3gain/aacgain commands are now wrapped in a centralized
function that takes care of output capture and error handling. This avoids code
duplication for the various sites at which the tool needs to be invoked.

This change also avoids unintentionally modifying tags via the command-line
tool. The "-s s" option makes the tool *just* calculate RG values rather than
toying with tags at all.
2012-10-15 12:14:35 -07:00
Adrian Sampson
df6c244381 replaygain: fix some spacing and error messages 2012-10-15 09:57:44 -07:00
Jakob Schnitzer
4ebc5237d0 replaygain: Fix TypeError if command option is not set 2012-10-15 16:23:03 +02:00
Adrian Sampson
f2ab26d6a4 mbcollection: change chunk size to 200 releases 2012-10-14 20:35:03 -07:00
Adrian Sampson
b1b4b39db7 merge 2012-10-14 14:16:52 -07:00
Adrian Sampson
526e82feaf move cpu_count to util module; credit @storrgie 2012-10-14 14:09:03 -07:00
Adrian Sampson
6b7d9a6f40 merge pull request #56 (thread count detection) 2012-10-14 14:01:04 -07:00
Fabrice Laporte
375137bc57 replaygain: fix aacgain waiting for user input by using -c switch to ignore clipping warnings 2012-10-13 11:35:24 +02:00
Adrian Sampson
b9e2beddec replaygain: changelog & doc enhancements for GH-55 2012-10-12 22:42:08 -07:00
Adrian Sampson
b6f34000f0 Merge pull request #55 from KraYmer/upstream
Adding threads to new ReplayGain backend based on command-line tool
2012-10-12 22:27:42 -07:00
Adrian Sampson
fcf5ec0b68 convert: low-level tweaks
Mainly adding some careful handling of paths (pass through displayable_path
before logging, etc.).
2012-10-12 22:19:27 -07:00
Adrian Sampson
71a5a5b02f only load plugins from specified modules
Eliminate the __subclasses__ trick for finding all plugins. Now we explicitly
look in each plugin module for a plugin class. This allows us to import plugin
modules with unintentionally loading them. This lets us reuse the image
embedding machinery without copypasta.
2012-10-12 21:55:54 -07:00
Andrew G. Dunn
4ee39ed9da Forgot to actually call the function 2012-10-12 08:25:28 -04:00
Andrew G. Dunn
365fa4347e Added processor/thread detection, by default will now use maximum available processor count instead of 2. Idea adapted from soundconverter, credits in function. 2012-10-12 07:48:52 -04:00
Fabrice Laporte
ca6fd2ccf5 rgain: unclutter stdout 2012-10-12 08:54:35 +02:00
Fabrice Laporte
17842b8d0d rgain: fix computation on singleton import 2012-10-12 08:53:14 +02:00
kraymer
6208c453c6 add apply_gain option (was default) 2012-10-12 08:52:12 +02:00
kraymer
7265119aad change replaygain plugin backend: it now invokes a command line tool (mp3gain or aacgain) 2012-10-12 08:51:36 +02:00
Jakob Schnitzer
e316d0ea30 convert: PEP8, changelog note and license 2012-10-11 17:10:28 +02:00
Jakob Schnitzer
115c0e7410 coonvert: make sure temporary are deleted if encoding is interrupted 2012-10-10 10:15:51 +02:00
Jakob Schnitzer
8f9b4f0362 convert: remove bloat that's not needed after the fix to pipeline 2012-10-09 23:11:05 +02:00
Adrian Sampson
1662f34528 "plugin is not configured" logged as debug message
@tezoulbr: I'm changing these to debug messages partially so they don't print
out when running the tests (with nose, for example) but also because it could
get a little annoying for someone who *intends* to use the defaults for one of
these plugins. Let me know if you disagree.
2012-10-09 10:47:19 -07:00
Jakob Schnitzer
a2ff20979f convert: Changed threading model to use beets.util.pipeline, fix embed 2012-10-09 14:05:54 +02:00
Jakob Schnitzer
b05fc8ef4f Merge branch 'convert' 2012-10-08 12:49:04 +02:00
Jakob Schnitzer
aa3a66daad Add option to disable embedding 2012-10-08 11:26:33 +02:00
Jakob Schnitzer
d1ab9267d0 Added lots of options, support MP3 as source 2012-10-07 22:19:15 +02:00
Matteo Mecucci
eebfaafe70 Small optimization in the fuzzy search plugin. 2012-10-07 22:02:43 +02:00
Jakob Schnitzer
3d580fc933 Added threads, cleaned up some of the code 2012-10-05 23:04:50 +02:00
Jakob Schnitzer
bbf974e581 First version of convert plugin 2012-10-05 20:56:59 +02:00
Blemjhoo Tezoulbr
3eb11355cf ihate plugin: ver 1.0 - initial import 2012-10-05 02:37:21 +03:00
Blemjhoo Tezoulbr
c9fafb8379 plugin the: ver 1.1 - singleton mode, code cleanup 2012-10-05 02:04:51 +03:00
Blemjhoo Tezoulbr
a4033faf3b zero plugin: ver 0.10 - code cleanup 2012-10-05 00:47:46 +03:00
Jakob Schnitzer
ba140a3f97 Added command to the lastgenre plugin 2012-10-04 10:56:31 +02:00
Adrian Sampson
2793af7d70 zero, the: Python 2.6-compatible format strings 2012-09-25 15:13:33 -07:00
Adrian Sampson
d09308eab2 Merge pull request #49 from tezoulbr/master
new plugin - zero
2012-09-25 14:04:19 -07:00
Philippe Mongeau
d6f2bf20f4 fuzzy_search: enable setting threshold value from the config file 2012-09-22 17:35:39 -04:00
Blemjhoo Tezoulbr
aff36fa694 zero plugin, version 0.9 2012-09-22 15:50:33 +03:00
Philippe Mongeau
1e48317e51 fuzzy_search: simplifiy some nested code 2012-09-21 19:57:47 -04:00
Adrian Sampson
0d3064bae8 Merge pull request #48 from phmongeau/fuzzy
Fuzzy Search plugin
2012-09-18 10:26:16 -07:00
Philippe Mongeau
dfca295e31 pep8ify fuzzy_search 2012-09-17 22:40:38 -04:00
Philippe Mongeau
ca237ce3e7 make fuzzy_search case insensitive and add a threshold option
renamed fuzzy_list.py to fuzzy_search.py
2012-09-17 22:12:14 -04:00
Adrian Sampson
201571bf93 changelog note &c. for "the" plugin (GH-47) 2012-09-17 11:11:22 -07:00
Adrian Sampson
cdc833b8ab Merge pull request #47 from tezoulbr/master
new plugin: "the" (pattern moving in path formats)
2012-09-17 11:06:22 -07:00
Blemjhoo Tezoulbr
16aa842ccf plugin the: version 1.0 2012-09-16 04:42:39 +03:00
Fabrice Laporte
49a6b993d3 lastgenre: add existing genre to the list of suggested tags to canonicalize 2012-09-15 12:00:33 +02: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
a9fc483a36 importfeed: fix "link" mode w/ unicode paths 2012-09-11 17:32:43 -07:00
Zach Denton
6c6ae5a7c0 Send correct filename when downloading a file. 2012-08-26 15:19:03 -04:00
Adrian Sampson
473fe04f91 web: add size to item JSON in API
This is to be used by the Tomahawk resolver, which wants file sizes.
2012-08-24 19:20:27 -07:00
Adrian Sampson
6200f0a4c8 scrub: remove all types of tags 2012-08-24 15:39:13 -07:00
Adrian Sampson
420c78ff1b lyrics: fix UnicodeDecodeError with non-ASCII text 2012-08-19 13:42:43 -07:00
Adrian Sampson
701d8cf204 fetchart: fix extension-less files from CAA 2012-08-02 09:46:57 -07:00
Adrian Sampson
174824c570 lyrics: suppress not-found message
(in Lyrics.com results)
2012-07-24 15:33:44 -07:00
Adrian Sampson
ca1581996d fix early call to imported_items in chroma 2012-07-24 14:56:14 -07:00
Adrian Sampson
26fa3bcac6 remove outdated call in BPD 2012-07-24 14:26:47 -07:00
kraymer
e9104b6775 plugin importfeeds: fix symlink creation when it already exists 2012-07-21 13:27:15 +02:00
Adrian Sampson
ec849a3f88 chroma & lyrics: crash due to name change
I changed ImportTask.all_items to ImportTask.imported_items but forgot to change
the calls in the chroma and lyrics plugins.
2012-07-03 17:18:23 -07:00
Philippe Mongeau
5a2719711e Rename Fuzzy plugin class name. remove useless
conversion of an iterator to a list

the plugin class was called Random (because of copy
paste)
2012-06-25 20:54:11 -04:00
Philippe Mongeau
7187d93303 implement album option for the fuzzy plugin 2012-06-25 20:54:11 -04:00
Philippe Mongeau
288902a572 add experimental fuzzy matching plugin
fuzzy is a command which tries to be like the list command but using
fuzzy matching.
2012-06-25 20:54:11 -04:00
Adrian Sampson
6503e85a57 fetchart: autofetch option
This necessitated a slight refactoring in the plugin event handling mechanism.
Rather than loading all handlers up front and storing them in a module-scope
structure, we now scan for event handlers at every send(). This is probably
very slightly less efficient but allows for more flexible logic.
2012-06-24 19:01:19 -07:00
Adrian Sampson
fbb5823541 fetchart: command to manually download art 2012-06-24 18:27:00 -07:00
Adrian Sampson
77cbb19564 fetchart: get local art for as-is imports (GC-339) 2012-06-24 17:41:37 -07:00
Adrian Sampson
d807b3fbf1 Cover Art Archive support (GC-71) 2012-06-24 16:57:04 -07:00
Adrian Sampson
11d4fb1abb move album art fetching to a plugin (fetchart) 2012-06-24 00:34:50 -07:00
Adrian Sampson
c5424dce05 lastgenre and lyrics: use new pluggable import stages
This solves a problem where files were copied before the genre field was
updated, resulting in problems when $genre was used in a path (GC-357).
2012-06-08 15:17:49 -07:00
Adrian Sampson
00c47b6811 library has per-thread transaction stacks (GC-399)
The Library object is now (almost) safe to share across threads. Per-thread
resources are now automatically managed internally. There is no longer any need
for the _reopen_lib hack to get multiple copies of the Library object.
2012-06-08 11:09:45 -07:00
Adrian Sampson
d88afbad11 library maintains per-thread DB conns. (GC-399) 2012-06-08 10:49:47 -07:00
Adrian Sampson
d83c1fad6b chroma: use multiple recording candidates 2012-06-06 12:35:25 -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
kraymer
2c67f0f76e importfeeds: write _feeds_dir global once, on reception of 'library_opened' event 2012-05-27 23:15:16 +02:00
Adrian Sampson
66e75c398d embedart: log & skip unreadable audio files 2012-05-21 10:47:17 -07:00
Adrian Sampson
face0ba323 chroma submission: fix crash; better errors 2012-05-17 14:54:58 -07:00
Philippe Mongeau
9824cee7fb add the 'path' argument to mpdupdate plugin 2012-05-17 12:31:19 -04: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
f6b37d2c8c remove with_statement __future__ imports
This is the first of several commits that will modernize the beets codebase for
Python 2.6 conventions. (Compatibility with Python 2.5 is hereby abandoned.)
2012-05-13 20:39:07 -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
fb3956723c fix format string in info plugin 2012-05-12 15:21:45 -07:00
Fabrice Laporte
031ae68006 Merge pull request #36 from KraYmer/master
Issue 358:Options for when lastgenre fails to find a tag
2012-05-09 00:11:32 -07:00
Nicolas Dietrich
a0e133ae5d Allow unicode in rewrite items
This commit makes rewrite explicitely match items using the .lower() function
instead of using Pythons builtin re.I flag.

This is required as the re.I flag only allows for case-independent pattern
matching with ascii chars. Even worse, the pattern is stored in lowercase when
using re.I, but the value to be matched isn't lowercased.

Example:

[rewrite]
artist Сергей Васильевич Рахманинов: Sergei Rachmaninoff
2012-05-09 00:21:06 +02:00
kraymer
c4783e25f8 'Issue 358:Options for when lastgenre fails to find a tag'. Added 'fallback_str' plugin parameter to specify a fallback string when no genre found. Declare the parameter without specifying a value (= empty string) to blank the genre field when no genre found. 2012-05-08 23:41:07 +02:00
Matteo Mecucci
030c656a75 Added support for random and repeat in the bpd plugin. 2012-05-08 22:53:17 +02:00
Adrian Sampson
6ce08c4ce6 merge 2012-05-08 11:59:41 -07:00
Adrian Sampson
8b25a86ee3 use 2.6-compatible format strings 2012-05-08 11:46:08 -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
5a9cc6a2d9 fix crash on 0 chroma matches for singleton 2012-05-06 21:19:13 -07:00
kraymer
f92d5d5e29 change m3u open mode to 'a' so file content is not reseted at each import when in 'm3u' mode 2012-05-02 21:51:37 +02:00
Adrian Sampson
1ee07e116e flexible -f templates for album listings (and rdm) 2012-04-30 22:59:17 -07:00
Adrian Sampson
fa3e41c86a BPD: print messages reflecting tree (re)build 2012-04-30 12:02:00 -07:00
Adrian Sampson
de87fb7489 memoize %aunique results (share among tracks) 2012-04-29 18:07:29 -07:00
Adrian Sampson
d042bed27c pre-parse path format templates
Instead of parsing the template at each call to destination(), it's now possible
to parse them *once*, a priori, and re-use the resulting template object. This
is analogous to the re module's compiled expressions.
2012-04-29 15:30:43 -07:00
Philippe Mongeau
97e202e015 importfeeds: use expanduser on feeds_dir 2012-04-15 21:18:38 -04:00
Matteo Mecucci
43cebabcb6 Added sorting in listing command of bpd 2012-04-15 17:05:16 +02:00
Adrian Sampson
2c11855b1e catch URL fetch exceptions in lyrics plugin 2012-04-10 21:05:01 -07:00
kraymer
78fbe6d836 rename 'm3uupdate' plugin to 'importfeeds'. Handles two more output formats: multi m3u files (one per item imported) and symlinks. Update plugin docs.
Conflicts:

	docs/plugins/index.rst
2012-04-10 12:06:38 -07:00
kraymer
00d47b1bff The default setting for the plugin is now a m3u directory path (m3u_dirpath).
User can specify a fixed name (eg *import.m3u*) by setting the `m3u_fixedname`, otherwise a dynamic m3u filename will be generated base on the imported items (album/track title).
2012-04-10 12:05:12 -07:00
Adrian Sampson
2d20e3582b typo: >=, not > 2012-04-01 20:58:49 -07:00
Adrian Sampson
44bcc5b3bd chroma: "beet submit" command (#332) 2012-04-01 20:41:27 -07:00
Adrian Sampson
01dce53212 store Acoustid data in DB & file
This is accomplished via a new event, "import_task_apply", which is called
right after metadata is applied to newly-imported items.

This change makes chroma REQUIRE a new version (0.6) of pyacoustid. Users with
older versions installed will see complaints about a missing method
"fingerprint_file".
2012-04-01 19:38:46 -07:00
Adrian Sampson
82a4bafc3e chroma: fingerprint when task begins
The old "caching"-based approach to fingerprinting was kinda hacky to begin
with. Now, the chroma plugin has an explicit opportunity (in the form of a new
event) to perform its initial fingerprinting and lookup for all tracks. Then,
this information is used explicitly during the autotagging phase rather than
being used transparently through memoization of the lookup function.
2012-04-01 18:55:14 -07:00
Adrian Sampson
aeeb040fe4 chroma: more logging on match failure 2012-04-01 17:55:30 -07:00
Adrian Sampson
2466305d7e add MusicBrainz collection plugin by @jeffayle 2012-03-23 11:34:57 -07:00
Adrian Sampson
9befb94561 -n option for random command (#24) 2012-03-23 10:33:44 -07:00
Adrian Sampson
7e6cdd75d6 docs & changelog for rdm plugin 2012-03-23 10:26:50 -07:00
Adrian Sampson
fc45e5fb97 Merge pull request #24 from phmongeau/random_plugin
add random plugin
2012-03-23 10:15:56 -07:00
Adrian Sampson
22e8695172 BPD: use playbin2 instead of playbin (#364) 2012-03-21 14:25:01 -07:00
Philippe Mongeau
bdef5ef152 add random plugin 2012-03-20 22:10:43 -04:00
Adrian Sampson
af0da7d1b6 m3uupdate docs, changelog, and cleanup (#23) 2012-03-18 16:42:12 -07:00
kraymer
f670fc87ab add 'm3uupdate' plugin 2012-03-17 12:12:12 +01:00
Adrian Sampson
3ffbe171e5 lyrics: detect missing lyrics in lyrics.com result 2012-03-10 12:40:19 +00:00
Adrian Sampson
c65b237b99 lyrics: resolve &nbsp; entity 2012-03-10 12:37:57 +00:00
Adrian Sampson
5befad8ba0 lyrics safely decoded from bytes 2012-03-10 12:33:19 +00:00
Adrian Sampson
2d3c9d9f9a suppress more pylast errors (#349) 2012-02-26 17:57:40 -08:00
Adrian Sampson
8fca659392 log errors when fingerprinting fails 2012-02-26 17:51:19 -08:00
Adrian Sampson
8d9c324b61 fix unicode encoding for lyrics requests (#350) 2012-02-26 12:54:27 -08: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
74f14a7aeb fix plugin errors with missing sections 2012-01-31 18:52:27 -08:00
Adrian Sampson
eb8b194508 handle acoustid response w/ no recording (#322) 2012-01-29 17:50:03 -08:00
Adrian Sampson
7b265e353d print a better error for exceptions raised from inline snippets 2012-01-29 13:27:47 -08:00
Adrian Sampson
dbab290ba4 fix rewrite bug w/ multiple rules for a single field 2012-01-25 13:32:22 -08:00
Adrian Sampson
a58253b79c "lyrics -p" prints out lyrics 2012-01-19 12:43:29 -08:00
Adrian Sampson
248a433d1d lyrics auto-fetch on import (#137) 2012-01-19 12:39:20 -08:00
Adrian Sampson
01a54e2e0e first stab at revamped lyrics plugin (#137) 2012-01-19 12:25:11 -08:00
Adrian Sampson
347a29b0f6 rewrite plugin
--HG--
rename : docs/plugins/inline.rst => docs/plugins/rewrite.rst
2012-01-16 20:48:23 -08:00
Adrian Sampson
9920cc482c add "scrub" plugin (#280)
--HG--
rename : beetsplug/embedart.py => beetsplug/scrub.py
rename : docs/plugins/embedart.rst => docs/plugins/scrub.rst
2012-01-02 14:03:28 -08:00
Adrian Sampson
a1b2b6c8a2 fix plugin hook in embedart 2011-12-28 15:56:07 -08:00
Adrian Sampson
890021008a inline plugin: define template fields in config (#169) 2011-12-27 14:43:58 -08:00
Adrian Sampson
93678307ef lastgenre now writes tags to files (#279)
This was accomplished by adding a new "config" parameter to the *_imported
events so that the handlers can check whether writing is enabled.
2011-12-20 17:49:11 -08:00
Adrian Sampson
0cc92e482b remove lastid plugin 2011-12-17 22:05:11 -08: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
def0f2c0e5 update lastid plugin for Album/TrackInfo objects
The plugin's deprecated, but there's no reason not to keep it in working order
with the recent changes to the autotagging workflow.
2011-12-06 18:32:27 -08:00
Adrian Sampson
82367e9067 cleanup for partial match feature (#260)
- Plugins are sent the unadulterated, None-ridden ordered items lists. Changed
  the lastid plugin to accommodate this.
- Make colorization optional in partial album warnings.
- Fix some tests.
2011-12-01 14:03:32 -08:00
Adrian Sampson
c03fb658c7 clean up genre canonicalization (#264)
- Canonicalization is disabled by default. (This prevents pyyaml from being a
  dependency if you don't use canonicalization.)
- Config value to set the tree file.
- Python style.
- Added YAML file to MANIFEST.in.
- Documentation.
2011-12-01 12:14:11 -08:00
kraymer
9fd10c0186 add genres canonicalization: when a last.fm tag is found but rejected (because not in user whitelist), try to found a
parent tag that is accepted

--HG--
extra : transplant_source : %C6%F2%F9%EDY%C4%1B%FD%BDV/%E5%041I%CB4%00%0A%07
2011-10-11 00:16:57 +02:00
Adrian Sampson
6f5beff8e0 use non-minified JavaScript libraries (#259) 2011-11-23 18:26:08 -08:00
Adrian Sampson
99bb4df94b check for releases in acoustid result (fixes #252) 2011-11-19 17:55:19 -08:00
Adrian Sampson
1219c9c0fb remove some dead code from replaygain 2011-11-13 15:54:08 -08:00
Peter B
6b3365303a -moved replaygain plugin from Lugoues/beets-replaygain into beets core
-moved output to debug messages
2011-11-13 17:15:32 -05:00
Adrian Sampson
f2bb220f5a chroma plugin (for acoustid fingerprinting) (#152)
--HG--
rename : docs/plugins/lastid.rst => docs/plugins/chroma.rst
2011-11-12 15:33:00 -08:00
Adrian Sampson
604a7d5aa0 removed basically unused Last.fm/MBID logic 2011-10-23 16:01:55 -07:00
Adrian Sampson
5ab92fe853 fix outdated imports 2011-10-11 19:36:16 -07:00
Adrian Sampson
1e88b9ea8d fix storing of genres after item import 2011-10-11 10:20:43 -07:00
Adrian Sampson
b62b462b1e file-based genre whitelist & cleanup
--HG--
rename : beetsplug/lastgenre.py => beetsplug/lastgenre/__init__.py
2011-10-07 12:51:38 -07:00
kraymer
0805e50a13 fixes initialization of the whitelist when no genre specified in the config 2011-09-24 23:56:48 +02:00
kraymer
35a06e6b62 add a config parameter to lastgenre plugin allowing to define a genres whitelist 2011-09-24 23:31:15 +02:00
Adrian Sampson
21d919fbd0 share last.fm API key among plugins 2011-09-23 12:37:56 -07:00
Adrian Sampson
d6431b992e lastgenre plugin (#139) 2011-09-23 12:33:47 -07: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
521131bc2b screenshot image and syntax cleanup 2011-09-17 15:32:27 -07:00
Adrian Sampson
9348c6a2b8 port and host options for web plugin 2011-09-16 12:00:05 -07:00
Adrian Sampson
9d1870af16 fix reference to old greenlet client 2011-09-05 13:06:01 -07:00
Adrian Sampson
05aa907e23 move player to the left 2011-08-08 18:41:25 -07:00
Adrian Sampson
4dc020e4a7 show a few more file details 2011-08-08 16:38:02 -07:00
Adrian Sampson
8e0638512d automatically play next track 2011-08-08 16:27:28 -07:00
Adrian Sampson
7a28dcecb0 player improvements: double-click to play; visual indicator 2011-08-08 16:19:22 -07:00
Adrian Sampson
b6ac0e4d36 replace audio.js with a hand-rolled player 2011-08-08 15:11:49 -07:00
Adrian Sampson
952dbad142 in-page media player using audio.js 2011-08-07 10:30:44 -07:00
Adrian Sampson
ba45cf6964 show more detail about items 2011-08-07 01:08:08 -07:00
Adrian Sampson
e06f3247fd UI tweaks 2011-08-07 00:42:24 -07:00
Adrian Sampson
586371a4e2 show detail for selected item 2011-08-07 00:30:57 -07:00
Adrian Sampson
e8baeb0c07 a little style for the web interface 2011-08-06 23:56:40 -07:00
Adrian Sampson
568683af21 basic Backbone.js-based frontend 2011-08-06 11:20:17 -07:00
Adrian Sampson
8493909a81 albums and queries in web plugin 2011-08-06 09:52:22 -07:00
Adrian Sampson
c11c7fe4cc playing around with a Web API 2011-08-05 17:35:47 -07:00
Adrian Sampson
3b2ea5d289 add a missing __future__ import in embedart 2011-07-10 12:07:52 -07:00
Adrian Sampson
f53a06ddf1 merge 2011-07-07 08:33:33 -07:00
Adrian Sampson
fed8782ca1 fix Unicode queries from CLI arguments 2011-07-01 15:43:06 -07:00
Adrian Sampson
a448879ca9 infer album artist or VA for as-is imports (#161) 2011-06-29 10:36:07 -07:00
Adrian Sampson
fcc2744ac5 use separate shell arguments for queries to preserve whitespace 2011-06-26 00:12:45 -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
61a037af6f add "album art" to info plugin 2011-05-01 13:33:40 -07:00
Adrian Sampson
a0e7c70c64 "clearart" command for removing embedded album art 2011-04-27 10:37:46 -07:00
Adrian Sampson
73c4bedc41 simplify MediaFile art interface: no type is included
The interface no longer specifies the type of the image embedded in the file; it
just returns a bytestring blob. When a type must be stored, it is inferred using
the imghdr module, which shoudl reduce the potential for weird bugs when the
formats don't correspond.
2011-04-27 10:27:26 -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
2768e71c21 config option for disabling automatic embedding 2011-04-21 01:42:08 -07:00
Adrian Sampson
e8d54af9df NEWS note; check for missing art when extracting 2011-04-21 01:33:56 -07:00
Adrian Sampson
415fe0be31 "embedart" and "extractart" commands 2011-04-21 01:20:50 -07:00
Adrian Sampson
866c662014 use imghdr directly instead of MIME lib (which uses imghdr) 2011-04-21 00:42:16 -07:00
Adrian Sampson
c20ce11a8c update album art embed plugin for new API
--HG--
rename : beetsplug/embedcoverart.py => beetsplug/embedart.py
2011-04-21 00:01:34 -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
a0e0104d83 clean up some log handler addtions 2011-04-15 12:30:12 -07:00
Adrian Sampson
6ba433e3b1 fix track query syntax
It turns out the documentation for MB was wrong here:
http://wiki.musicbrainz.org/XMLWebService#Searching_Tracks
At the time that I read it, at least, that said the field for track title was
named "title". It's actually named "track".
2011-04-13 21:33:37 -07:00
Adrian Sampson
f567c505d8 plugin item candidates, including lastid support for singletons 2011-04-13 21:20:21 -07:00
Adrian Sampson
88fd6c604c merge event fix from Lugoues 2011-04-10 22:22:16 -07:00
Adrian Sampson
e669868896 move a bunch of functions to util 2011-04-10 21:48:05 -07:00
Peter B
9df548c738 updated embedcoverart plugin for album_imported change 2011-04-11 00:23:54 -04:00
Adrian Sampson
2aa9a17fb3 rename albumart_data to albumart; fix indentation 2011-04-10 12:11:22 -07:00
Daniele Sluijters
00c5a275a4 *facepalm* and fix some Engrish. 2011-04-10 16:12:21 +02:00
Daniele Sluijters
1859375593 Only try to add albumart if the MIME-type is correct, log if it's not. 2011-04-10 14:54:32 +02:00
Daniele Sluijters
0628d8df0e Add initial version of the embed coverart plugin.
This plugin allows users to embed the cover into the audio file.
Probaly still has a few bugs but it should work in most cases right
now.
2011-04-10 14:51:01 +02:00
Adrian Sampson
bb8ebd24b0 fix adding tracks in BPD 2011-04-09 10:44:56 -07:00
mdecker
4eead8d846 fix divzero error in distance debug output in lastid plugin 2011-04-04 20:52:06 +02:00
mdecker
4d571b2281 fix lastid plugin breakage introduced in f256726 2011-04-04 11:22:31 +02:00
Adrian Sampson
379b998a02 merge 2011-04-02 22:38:28 -07:00
Adrian Sampson
effc338957 "info" command for dumping file metadata 2011-04-02 19:59:22 -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
9d3eaa5b05 remove albumify plugin (it's been a while since beta 3) 2011-01-24 19:43:27 -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
5cab0ede24 fix lastid bug when plurality artist name was None 2010-10-10 12:37:45 -07:00
Adrian Sampson
c885b7b2b5 use logging a bit more instead of print_ 2010-09-28 10:40:44 -07:00
Adrian Sampson
86d9d75db4 outdated reference to _ie_dist 2010-09-22 19:59:08 -07:00
Adrian Sampson
a5cc58e228 merge 2010-09-21 10:41:48 -07:00
Adrian Sampson
ed89394368 mpdupdate plugin (and config system for plugins) 2010-09-21 10:40:39 -07:00
Adrian Sampson
751a46c716 more efficiently limit the number of results returned from MB 2010-09-18 11:01:20 -07:00
Adrian Sampson
4adb76bb65 fix parsing of escaped characters in MPD commands 2010-09-16 23:06:33 -07:00
Adrian Sampson
fc6f6750f7 more tag_album refactoring; typo fixed in lastid 2010-09-16 12:56:53 -07:00
Adrian Sampson
8b02dd176c lastid plugin can now generate its own candidates
That is, in addition to contributing to the distance function, the plugin can
also influence the initial search into MusicBrainz. This will allow albums to be
tagged even when they're missing metadata entirely. This change required a
significant bit of refactoring to the "mb" module -- it's much nicer now.
2010-09-16 12:27:04 -07:00
Adrian Sampson
4d978f3541 album-level distance function in lastid plugin
This involves yet another new plugin method: album_distance. This leaves as the
last major puzzle piece for lastid the ability to augment the initial search
into MB (i.e., can start a search using fingerprinted metadata).
2010-09-14 14:42:51 -07:00
Adrian Sampson
99cd36e34f weighting for fingerprinted metadata 2010-09-14 11:16:13 -07:00
Adrian Sampson
b7518038be fingerprinting track distance based on MB track IDs 2010-09-14 11:08:16 -07:00
Adrian Sampson
fba874932c beginnings of last.fm fingerprinting plugin for autotagger
This required the introduction of a track_distance method on plugins. We'll also
need to add an album_distance method as well as a mechanism for extending the
search routine (so we can search for albums in MusicBrainz even when they have
no tags). This commit also adds the '-v' flag for printing debug logs (something
we should do more of).
2010-09-13 21:14:49 -07:00
Adrian Sampson
514d1bc706 fixed silly error when listing tracks in BPD 2010-08-09 21:57:06 -07:00
Adrian Sampson
5b2653bb53 albumify plugin for upgrading old databases 2010-07-22 10:52:43 -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
6c0895de96 make sure beetsplug is loaded as a namespace package 2010-07-20 23:15:19 -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
Adrian Sampson
78efe771b1 extremely simple plugin system with discovery 2010-07-08 16:35:15 -07:00