Commit graph

2713 commits

Author SHA1 Message Date
Adrian Sampson
9f927438ca fix some dumb mistakes from most recent flurry 2013-05-28 22:04:20 -07:00
Adrian Sampson
72449caccf discogs: move config default into constructor
Such is the new convention for plugin configuratino defaults.
2013-05-28 21:45:31 -07:00
Adrian Sampson
6334f4d1a5 refinements to artpath modification patch
That's 371cc72f2d09 in hg. This makes the patch slightly more general by
reusing our type conversion infrastructure. It also uses "bytes" as a synonym
for "str" that I find a little bit clearer.
2013-05-28 21:41:03 -07:00
Adrian Sampson
4d44e11a32 back out source-sensitive sorting
This is now addressed by a distance penalty.
2013-05-28 21:28:46 -07:00
Adrian Sampson
b3646f2659 fix some docs syntax 2013-05-28 21:28:26 -07:00
Adrian Sampson
480fa80e47 discogs: penalty only for matches from discogs
Otherwise, this was penalizing all album matches.

This also applies the same treatment as the previous commit: only load the
config at run time (at the expense of code clutter).
2013-05-28 21:25:28 -07:00
Adrian Sampson
17ae1e90c5 avoid loading config at import time
By running .get() (or, rather, .as_number()) in the module scope, this was
forcing the configuration to be materialized when the module was imported.
This is a little bit messier but requires a less duplication and avoids that
early loading problem.

I know the as_number calls scattered throughout are rather ugly; I'm pondering
a solution to mitigate that.
2013-05-28 21:13:09 -07:00
Adrian Sampson
89e76b8e5a simplify current_metadata return value
We now just return the underlying dicts instead of an increasingly long tuple.
2013-05-28 20:51:30 -07:00
mrmachine
bf6f739ac1 Merge pull request #292 from mrmachine/improved-distance
Look at many more metadata fields when calculating distance.
2013-05-28 17:38:16 -07:00
Tai Lee
a5151bb32e Look at many more metadata fields when calculating distance.
Produce slightly more varied similarity score to prioritise extremely
similar releases.
2013-05-29 10:18:55 +10:00
Johannes Baiter
ad66b8796a Fix tests for albums from manual ID 2013-05-28 13:50:20 +02:00
Johannes Baiter
f17e8550ca Determine IDs from MusicBrainz and Discogs URLs 2013-05-28 13:49:34 +02:00
Johannes Baiter
e3418be75d Add support for manually entered release ID in Discogs 2013-05-28 12:58:05 +02:00
Johannes Baiter
a82e3f9f52 Delegate album_for_id to plugins if no MusicBrainz match is found 2013-05-28 12:57:02 +02:00
Lucas Duailibe
87dedaafad Fixes a bug when trying to modify the artpath with special characters
Basically, it uses the helpers that handle conversion bytestring <-> unicode with the item's path, but weren't being used with artpath. For now, it just fixes the behavior for `modify`
2013-05-27 02:06:27 -03:00
Tai Lee
29546fda5f Add missing import. 2013-05-27 01:34:22 +10:00
Tai Lee
35e926a51b Add Discogs and general source weight penalty (configurable, undocumented).
Discogs (and other individual plugins) should return a penalty between
0.0 and 0.1, which will be multiplied by the general source weight. This
allows individual plugins to be weighted against relative to each other,
and amplified together against other penalty categories (track, title,
etc.)
2013-05-27 01:28:40 +10:00
Tai Lee
7700eaee79 Update examples in docs to reflect new UI enhancements. 2013-05-27 01:25:13 +10:00
Tai Lee
799c85f380 Check for both track length and number difference independently when downgrading recommendations. 2013-05-25 22:47:07 +10:00
Tai Lee
e66a865f17 Rename the discogs max rec setting to non_mb_source, so it can apply to all data source plugins. 2013-05-25 22:44:41 +10:00
Tai Lee
feb1d8631d Move match distance weights to an undocumented configuration setting. 2013-05-25 17:59:00 +10:00
Tai Lee
a6b1bb1bbc Move articles to the front of Discogs artist names. 2013-05-25 14:05:03 +10:00
Tai Lee
22d82b73b4 Given an identical similarity, prefer MusicBrainz matches. 2013-05-25 13:18:51 +10:00
Tai Lee
e3fa403ad2 Only execute pathfields expressions and functions if they are called with an Item argument. Otherwise, return an empty string. 2013-05-25 12:28:52 +10:00
Tai Lee
3f4e194c41 We only need to strip the disambiguation from artist names, not the join strings. 2013-05-25 12:19:48 +10:00
Adrian Sampson
72f0505744 discogs: extra space in ambiguous artists (#289) 2013-05-24 12:31:18 -07:00
Adrian Sampson
d877f5e3e8 Merge pull request #289 from Smyds/master
Remove discogs artist disambiguation number
2013-05-24 12:28:50 -07:00
César Prouté
726c84674b remove discogs artist disambiguation number 2013-05-24 20:15:24 +01:00
Adrian Sampson
3807252685 slightly expand UI changelog description 2013-05-24 11:28:27 -07:00
Tai Lee
e040ad5b21 Display hidden penalties (artist, ID) in red instead of light grey on track list.
It's a impacting the similarity, so it should probably be a warning
colour for consistency.
2013-05-25 02:13:37 +10:00
Tai Lee
1a4dfa0c07 Fix tests. 2013-05-25 01:58:08 +10:00
Tai Lee
ae8f7560e9 reST fail. 2013-05-25 01:50:54 +10:00
Tai Lee
f19dcb0508 Update change log. 2013-05-25 01:45:36 +10:00
Tai Lee
835a3c2a73 Improved parsing of Discogs' position field.
Some albums have a single disc with positions like I, II, III, IV, etc.
Previously beets thought each track on these albums was a new medium.

Now we assume that if there is no explicit medium index and the ordinal
of an alpha medium does not appear to be sequential (e.g. A, B, C) that
the medium is actually the medium index.
2013-05-25 01:36:12 +10:00
Tai Lee
4c06c96630 Extract disc titles from Discogs' "index tracks". 2013-05-25 01:32:06 +10:00
Tai Lee
891efaeee1 Fix a bug where track number could be half red and half yellow. 2013-05-25 01:28:29 +10:00
Tai Lee
c99280ea95 Improved display of missing and unmatched tracks.
Display similar title lines for missing and unmatched tracks, to
separate them from matched tracks. When media numbers or titles are
shown, it looks like missing tracks are grouped under the last media.

With missing and unmatched tracks grouped under a heading now, we don't
need to display "missing track" or "unmatched track" on every line,
making it easier to read the track titles.

Change the prefix from " * " (same as matched tracks) to " ! " for
missing and " ? " for unmatched tracks.

Consistently format track index for both missing and unmatched tracks.
Previously we were omitting the # for missing tracks (compared to
matched tracks), and we were just showing the index (no # or media
number) for unmatched tracks.

Also display track length, if available.
2013-05-25 01:26:06 +10:00
Tai Lee
b46e905a9c Display disc/media number and title (if available) in track list.
This necessitated a slight tweaking of the line printing code so that
the " * " prefix is not hard coded for all lines. The prefix is now
included in the `lhs` part of lines that actually need it, and this
allows us to alter or omit the prefix for individual lines.
2013-05-25 01:17:23 +10:00
Tai Lee
0c608a2e19 Display partial match text before source text. It's a warning with penalty, so probably more important than the data source. 2013-05-25 01:04:13 +10:00
Tai Lee
ceec9afb60 Use turquoise instead of yellow for data source. It's not a warning or penalty, and is easier to distinguish from the partial match string. 2013-05-25 01:03:01 +10:00
Tai Lee
dc7e98fd22 extra_items and extra_tracks on AlbumInfo are now lists, sorted by track index and title. 2013-05-25 00:44:23 +10:00
Tai Lee
7f068a8c03 Add AlbumInfo.data_url property, populate it for Discogs matches and display it when it is non-empty.
Makes it easier for people to find the best Discogs (or other) match
and import it to Music Brainz using a grease monkey or similar script.
2013-05-24 22:50:14 +10:00
Tai Lee
1ad5d9eee1 Reverse [78a4026a2c].
If a file already has a track id, we should expect the best match album
to have a track with the same ID. Treat a missing ID the same as an
incorrect ID.
2013-05-24 16:41:32 +10:00
Tai Lee
f5557a74d7 Update intersecting max_rec and discogs docs. 2013-05-24 15:01:19 +10:00
Tai Lee
15be24998a Add ability to specify a maximum recommendation for Discogs matches. 2013-05-24 14:43:37 +10:00
Tai Lee
34faebfbdb Display "artist" and/or "ID" on RHS of track list in light gray when a penalty has been applied. 2013-05-24 14:42:00 +10:00
Tai Lee
1f7a782c01 Display source in release listing (yellow), if other than MusicBrainz. 2013-05-24 13:26:06 +10:00
mrmachine
22e895df83 Merge pull request #284 from mrmachine/ui-improvements
UI improvements and consistency. Colorisation, indentation, position by importance, and highlight benign changes.

1. Consistently colorise parenthesis surrounding colorised text that is conditional (doesn't always appear) so that it stand out more. This includes the album info data source (when it's not MusicBrainz), the album disambiguation (sometimes there is none), and the partial match message.

2. Indent the album title when there isn't a change. Makes it stand out more from the file path(s) above and info line below, and is consistent with the indentation when there is an album or artist change.

3. When listing releases, colorise album disambiguation in light gray to distinguish it more clearly from the album title. Light gray seems like a good colour because it is subtle, and disambiguation is supplementary information (not green/success, red/error or yellow/warning).

4. Also when listing releases, display similarity before partial message and disambiguation last. This is in order of importance, and also similarity is always present while the others are conditional, and finally it is often the case where the album title is the same and only the disambiguation is different. Using this order keeps things lined up in this case and easier to visually compare similarity and disambiguation text.

5. Colorise benign track index changes (to/from per disc numbering) in yellow, without applying a match penalty. We should still display these because even though the track number is still correct/equivalent, beets will apply a change if the new tags are applied.

6. Don't display source unless it's not MusicBrainz. By default beets will only find matches in the MusicBrainz database. Only if a plugin is enabled can a different source be used, so not everybody needs to see this all the time.
2013-05-23 16:04:52 -07:00
Tai Lee
fd20e419d6 Display constant data first (similarity) followed by optional data (partial match, disambiguation). Use consistent and colorized parenthesis for optional data. 2013-05-23 17:58:04 +10:00
Tai Lee
e12093e46c Display each part of info line in parenthesis. Source and disambiguation info are conditional. 2013-05-23 17:58:04 +10:00