Commit graph

12907 commits

Author SHA1 Message Date
Adrian Sampson
ce166004cb use AlbumMatch/TrackMatch objects everywhere
This allows matches to indicate both missing and unmatched tracks in their
candidates and solves some of the spaghetti tuples that were passed around
during autotagging.
2012-07-01 16:33:48 -07:00
Adrian Sampson
7464b138cf fix tests broken by TrackInfo.index 2012-07-01 14:16:22 -07:00
Adrian Sampson
1855cd71ce docs typo 2012-07-01 14:16:00 -07:00
Adrian Sampson
38b404240d merge 2012-06-29 15:27:05 -07:00
Adrian Sampson
b3e5dcd7c0 respect per_disc_numbering in missing tracks 2012-06-29 15:26:47 -07:00
Adrian Sampson
042f97f08f use TrackInfo.index in difference display
Again, enumerate() has been obviated by this addition.
2012-06-29 15:22:23 -07:00
Adrian Sampson
ee3214e0f9 use TrackInfo.index in apply_metadata
enumerate() no longer necessary.
2012-06-29 15:18:10 -07:00
Adrian Sampson
d4c3ea74c6 match ordering without length assumptions
This replaces order_items with assign_items, the first step to allowing unequal
numbers of items on either side of the equation (user files and canonical
tracks). Rather than returning a "holey" list and assuming that the TrackInfo
objects stay static, the function returns a dictionary mapping Item objects to
TrackInfo objects. To indicate unmatched objects, two sets are also returned.

For the moment, some temporary code is included to turn the result from this
new function into the old format (a holey Item list). This allowed me to test
this change in isolation before plunging ahead with the necessary refactoring to
expose all of this to the importer workflow, etc.
2012-06-29 15:11:25 -07:00
Adrian Sampson
8d7397135f AlbumMatch and TrackMatch types
These new named tuples will represent candidates given by the autotagging
system. In the case of album matches, these are currently unwieldy,
verbosely-documented tuples that will only get more unwieldy with the addition
of "unmatched tracks".
2012-06-29 15:06:05 -07:00
Adrian Sampson
98d46be4a5 include global index in TrackInfo objects 2012-06-29 14:06:28 -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
d97f13a899 pypy-compatible sqlite3 invocation 2012-06-24 13:30:36 -07:00
Adrian Sampson
713faca533 hg-compatible tox config 2012-06-24 13:06:34 -07:00
Adrian Sampson
59e08a3e0a Merge pull request #42 from msabramo/tox
Add support for tox (http://tox.testrun.org/)
2012-06-24 12:52:15 -07:00
Marc Abramowitz
a69b669abc Add .tox to .gitignore 2012-06-24 00:42:45 -07:00
Marc Abramowitz
39acbac9ce Add tox.ini for tox (http://tox.testrun.org/) 2012-06-24 00:41:10 -07:00
Adrian Sampson
11d4fb1abb move album art fetching to a plugin (fetchart) 2012-06-24 00:34:50 -07:00
Adrian Sampson
f5962f45d8 merge 2012-06-23 17:20:02 -07:00
Adrian Sampson
073ee14e56 fix broken matching of path format queries (#405)
A bug in the shlex module with Unicode strings made these queries unparseable
and thus match every track.
2012-06-23 17:18:28 -07:00
Adrian Sampson
7e6e5e5dca nicer error message when stdin is EOF'd 2012-06-21 17:37:45 -07:00
Adrian Sampson
9efdf93dd6 Merge pull request #41 from encukou/patch-1
Add missing parenthesis in docs
2012-06-17 13:07:48 -07:00
Petr Viktorin
d3c8297527 Add missing parenthesis in docs 2012-06-17 20:26:26 +03:00
Adrian Sampson
ad4b7f8ff5 new plugin event: import_task_files 2012-06-14 12:41:39 -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
48ffa08928 plugin import stages 2012-06-08 14:49:04 -07:00
Adrian Sampson
0259e7a728 changelog note about new locking (GC-399) 2012-06-08 11:44:59 -07:00
Adrian Sampson
b487001c9b exclusive database access (GC-399)
This is the crux of the matter. This new lock synchronizes accesses to the
database itself, allowing only one thread to have transactions active at a time.
In effect, this makes sure that beets only has one SQLite transaction active at
a time (and is very conservative in this effort; no read sharing is allowed
either). This prevents all contention in SQLite and hides the pathological
HAVE_SLEEP=0 behavior.
2012-06-08 11:34:54 -07:00
Adrian Sampson
5d6e9b387a synchronize access to mutable shared maps (GC-399)
We now properly synchronize access to _tx_stacks and _connections, which can be
concurrently mutated by different threads. This way I don't have to worry about
GIL semantics: DRF => SC!
2012-06-08 11:24:16 -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
01fe59955e changelog note for BPD crash (GH-40) 2012-06-03 23:03:28 -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
6c220f284a fix outdated BPD documentation
The update command is now supported.
2012-05-31 23:30:08 -07:00
Adrian Sampson
bfa3c5c806 length differences now shown as "X vs. Y"
Previously, they would be shown as "X -> Y", which made multiple users think
that beets was doing something to change the length of the track.
2012-05-30 16:44:20 -07:00
Adrian Sampson
e00f15175a prune is a no-op when file exists
i.e., when moving a file that's already at its destination.
2012-05-30 16:39:47 -07:00
Adrian Sampson
2b03ceae82 beets is now in Gentoo Portage 2012-05-30 15:28:50 -07: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
86f513d4ab split apply_choice coroutine
This essential import pipeline stage is now two: one that applies metadata
changes and one that manipulates the filesystem. This will eventually allow
lastgenere to apply its changes before destinations are calculated.
2012-05-22 23:22:34 -07:00
Adrian Sampson
66e75c398d embedart: log & skip unreadable audio files 2012-05-21 10:47:17 -07:00
Adrian Sampson
b3e0724676 send prompts to stdout (GC-389) 2012-05-20 11:42:53 -07:00
Adrian Sampson
c0da62c2b7 multi-artist sort names 2012-05-19 16:35:52 -07:00