Commit graph

81 commits

Author SHA1 Message Date
Tai Lee
dde4bfab8c Update signature for item_candidates() in chroma plugin. 2013-05-22 08:10:20 +10:00
Tai Lee
3eb6f8e5eb Add discogs plugin, which extends the autotagger to include results from the discogs database.
This is a refactor of the plugin developed by `imenem`.

- Pass `artist`, `album` and `va_likely` to `candidates()` so that
  plugins don't have to work this out from `items` all over again.
- Pass `artist` and `title` to `item_candidates()`.
- Silence spurious `urllib3` info log lines.
- Use a proper "beets" user agent with `discogs_client`.
- Remove `abstract_search` plugin. It seems unnecessary. How many
  music databases are there? How many will beets support? How much
  common code might there be between them? We can add some abstraction
  if or when more databases are supported.
- Derive more AlbumInfo and TrackInfo properties from discogs Release
  objects, especially album ID so that beets doesn't just use the first
  release and think all subsequent releases are duplicates.
- Add basic documentation, doc strings and code comments.
- Sanitise search query. Remove non-word characters and medium info that
  might filter out good search results.
- Use artist `join` strings from discogs Release object when an album
  or track has multiple artists.
- Don't rely on discogs track position, which is unreliable. But tracks
  are in order, so we can recalculate medium and medium_index as long as
  we can extract a consistent medium across tracks from the position.
- Add "various" as a known signal to indicate various artists.
- Prevent `chroma` plugin from returning a a huge track distance for any
  track that is missing an ID (e.g. all discog tracks).
- `TrackInfo.index` should be the release index (calculated by beets),
  not the medium index (derived from discogs track position).
- Add `AlbumInfo.data_source`. It's "Unknown" by default which is shown
  in red when displaying a suggested or selected match. The built in
  auto tagger sets it to "MusicBrainz" which is shown in green. Anything
  else (e.g. "Discogs") is shown in yellow.
- Remove double spaces from album titles (bad data from Discogs).
2013-05-21 21:16:52 +10:00
Adrian Sampson
ae40b97528 chroma: catch acoustid exceptions during submit 2013-03-12 20:30:57 -07:00
Adrian Sampson
aff3fb106d chroma: fingerprint command's write from config
This turns on metadata-writing based on the import.write config option, so
those with this option turned off will be spared any surprises. (Affects #217
and #143.)
2013-03-11 19:19:48 -07:00
Lucas Duailibe
704259b459 fix typo 2013-03-11 19:26:33 -03:00
Lucas Duailibe
a6ae5c4a4f cleaning up 2013-03-11 19:22:03 -03:00
Lucas Duailibe
3390fd339a store fingerprints with the "fingerprint" command 2013-03-11 18:31:53 -03:00
Lucas Duailibe
8a64686ff3 store fingerprints 2013-03-11 17:56:13 -03: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
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
3e9135ee7c syspath-ify call to pyacoustid (GC-464) 2012-12-07 14:49:11 -08:00
Adrian Sampson
ca1581996d fix early call to imported_items in chroma 2012-07-24 14:56:14 -07: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
Adrian Sampson
d83c1fad6b chroma: use multiple recording candidates 2012-06-06 12:35:25 -07:00
Adrian Sampson
face0ba323 chroma submission: fix crash; better errors 2012-05-17 14:54:58 -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
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
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
5a9cc6a2d9 fix crash on 0 chroma matches for singleton 2012-05-06 21:19:13 -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
8fca659392 log errors when fingerprinting fails 2012-02-26 17:51:19 -08:00
Adrian Sampson
eb8b194508 handle acoustid response w/ no recording (#322) 2012-01-29 17:50:03 -08:00
Adrian Sampson
99bb4df94b check for releases in acoustid result (fixes #252) 2011-11-19 17:55:19 -08: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