Commit graph

694 commits

Author SHA1 Message Date
Harry Khanna
4944686090 Change flag from --always to --force for symmetry with other beets commands 2014-08-19 14:07:17 -04:00
Harry Khanna
2ffd3e287f Add --always flag for write subcommand
Forces a write of tags to file even if the file's tags match the database.
This is useful to force plugins that respond to write (e.g., Scrub and Zero) to run on those tags.
This may also make the TODO comment in zero.py less important since creates a way to manually run the zero plugin on a file imported as-is.
2014-08-19 13:43:16 -04:00
Adrian Sampson
a45415fd77 Duplicate summaries work with singletons (#900) 2014-08-18 22:07:50 -07:00
Adrian Sampson
0ec285f96c Formatting and style refinements for #900 2014-08-18 21:37:13 -07:00
Howard Jones
4aa783f09d Final reshuffle to put summarize_items in beets.ui
Also improved duration display.
2014-08-18 12:21:45 +01:00
Howard Jones
3ec7426a35 Pass found duplicates between task and session 2014-08-18 10:35:01 +01:00
Howard Jones
a15cf2b001 Moved summarize_items to utils. Cleaned up output
Output now uses K for bitrate.
summarize function now in util
2014-08-18 08:57:59 +01:00
Howard Jones
4bf07aa8a6 Changed to not require collections
collections library is only available in Py 2.7+
2014-08-17 19:11:01 +01:00
Howard Jones
af347d957e Basic summary information for duplicates
Added a one-line summary of each album (in lib, and import target) so
you can easily tell if (for example) you are about to overwrite your
FLAC copy with a low-bitrate mp3 from somewhere else.
2014-08-17 18:53:02 +01:00
Thomas Scholtes
dc53f7907a Fix completion script 2014-07-08 17:52:46 +02:00
Thomas Scholtes
d2e848f75c Refactor help command and cli parsers
* Control flow and implementation of help command is now
  similar to the other commands.
* Simplifies and flattens some code and removes unused method.
* Makes SubcommandOptionParser agnostic of Subcommand.parser.
2014-07-08 17:10:39 +02:00
Pierre Rust
ebd2da14dc Fix error on default sort configuration
Fix crash when using several criteria for default sort in the
configuration file.
2014-06-15 22:32:25 +02:00
Pierre Rust
86c34f8740 Moves default sort specification from code to conf
Default sort order can be set in configuration file with the
`sort_album` and `sort_item` keys.
2014-06-15 22:32:25 +02:00
Heinz Wiesinger
d36b54cd56 Make beet write not show item names for items without changes. 2014-06-09 13:27:10 +02:00
Adrian Sampson
30c5f4ddf4 Changelog for #810 (fix #320) 2014-06-08 17:27:06 +01:00
Bruno Cauet
f40517b09e Show file path when deleting items
Using `beets remove -d <target>" now shows the file path when asking for
confirmation.

The format string is '$path - $title'.

Fix issue #320.
2014-06-08 17:22:15 +02:00
Adrian Sampson
e9355f336b Rename remove_duplicates and do_remove_duplicates 2014-04-26 20:21:20 -07:00
Thomas Scholtes
8fc9f3463f Add more paths to search for bash completion 2014-04-17 13:39:06 +02:00
Thomas Scholtes
151b451c33 Add more paths to search for bash completion 2014-04-16 23:53:45 +02:00
Adrian Sampson
033cf9ec21 spell check 2014-04-15 21:17:23 -07:00
Adrian Sampson
4e227d66a3 tiny indentation fix 2014-04-14 12:34:01 -07:00
Adrian Sampson
fcb55145e6 standardize placement of command setup
This groups together all of the optparse setup calls separately from the
functions. This comes at the expense of showing the command-line options above
the code that interprets them.

Making me wish for a more declarative CLI setup style...
2014-04-14 12:11:49 -07:00
Adrian Sampson
03bea61ac0 commands.py is flake8-clean 2014-04-14 10:53:32 -07:00
Adrian Sampson
fc143ecd54 changelog & style tweaks for #686 2014-04-14 10:43:09 -07:00
Mook
12a5215afa beet modify: Add simple argument parsing tests. 2014-04-13 21:24:45 -07:00
Mook
52d0c19fb7 beet modify: Treat arguments with : before = as queries, not modifications
This can be useful if the value being queried contains an equal sign.
2014-04-13 19:41:22 -07:00
Thomas Scholtes
1df6303222 Notify user when moving files 2014-04-13 13:18:41 +02:00
Adrian Sampson
4c9daa12cc Merge pull request #676 from geigerzaehler/item-try-write
Add item.try_write() to log errors
2014-04-10 11:33:06 -07:00
Thomas Scholtes
5d753b4f38 Remove ALBUM_* constants. Closes #650 2014-04-10 17:44:39 +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
c3ea1ded30 Add item.try_write() to log errors
Many commands and plugins use `item.write()` to update tags. Since the success
of the call is not critical to the functionality of most consumers we want to
catch any exceptions, log an error and continue with our task. The new method
encapsulates this logic.

This fixes #675.
2014-04-10 15:26:05 +02:00
Adrian Sampson
323be89d4d fold OrderedEnum into autotag module
This puts the OrderedEnum generic class next to where it is actually used. It
also refers to the recipe it is taken from on docs.python.org. I also took the
opportunity to give this a capitalized name (since it's a proper type).
2014-04-08 17:10:50 -07:00
Adrian Sampson
b3f31cbc0a rename Item.media_fields to _media_fields
Following the convention of the other field sets and such. This helps avoid
any confusion with user-specified fields (although it's unlikely people will
want to name a flexible field "media_fields" :).
2014-04-07 20:21:20 -07:00
Adrian Sampson
c6451cfc50 write: fix undefined reference to MediaFile 2014-04-07 19:44:21 -07:00
Adrian Sampson
28556a0c37 catch ReadError when calling item.read() 2014-04-07 19:42:54 -07:00
Thomas Scholtes
55e5381bbd Merge branch 'extendable-mediafile'
Conflicts:
	beets/library.py
	docs/dev/plugins.rst
2014-04-07 23:49:29 +02:00
Thomas Scholtes
4b1a1e3d65 Remove ITEM_KEYS_WRITABLE 2014-04-04 00:03:40 +02:00
Thomas Scholtes
3c7dd13b72 Add Item.media_fields
This new property controls which fields to read from a media file.
2014-04-03 23:35:33 +02:00
Adrian Sampson
ac99622ec7 Merge branch 'single-files'
Conflicts:
	docs/changelog.rst
2014-04-03 13:20:53 -07:00
Adrian Sampson
b683f239f0 some style tweaks for #638 2014-04-02 21:18:41 -07:00
Adrian Sampson
c9141a6adf import single files and one-track albums
An alternate proposal for what's being discussed in #640.
2014-04-02 17:14:48 -07:00
Bruno Tournay
cd70e92b7f Modify command: ability to delete/reset an attribute (beet modify field!) 2014-04-01 22:38:33 +02:00
Adrian Sampson
05ebd6d28e FileOperationError: also include the file path
This makes the errors fully self-descriptive, which simplifies logging them as
errors (you just have to `log.error(exc)` to get a reasonable message). We
also now handle these at the top level in case someone forgets to add a
handler. But in this case, we also send the full traceback to the debug log.
2014-03-25 22:41:28 -07:00
Thomas Scholtes
574903e986 Add FileOperationError and handling in item.write() 2014-03-24 14:22:27 +01:00
Thomas Scholtes
85b16e4e3d Remove unused code 2014-03-22 13:25:25 +01:00
Thomas Scholtes
a399f294e8 Handle exceptions in item.write and use plugin abort 2014-03-22 13:25:25 +01:00
Thomas Scholtes
a744e8ea59 Fix missing import 2014-03-22 13:25:25 +01:00
Thomas Scholtes
ddf5233daa Add _item_write method and remove duplicate code 2014-03-22 13:25:25 +01:00
Thomas Scholtes
13cbcad581 Unify exception handling of item.write() in UI
Don’t abort the program when there is something wrong with the filesystem.
2014-03-22 13:25:25 +01:00
Thomas Scholtes
002d360039 Show only changed and writable values with the write command 2014-03-10 23:57:19 +01:00
Adrian Sampson
c325e1645f hide the completion command from help (#553) 2014-03-07 15:07:28 -08:00
Adrian Sampson
606444049e tiny style cleanups in built-in commands 2014-03-07 14:48:47 -08:00
Thomas Scholtes
8a5a2fcebf Merge branch 'completion'
Conflicts:
	beets/ui/commands.py
	docs/reference/cli.rst
2014-03-02 23:06:05 +01:00
Thomas Scholtes
210592a06b Use _package path instead of resource_string 2014-03-02 21:11:57 +01:00
Thomas Scholtes
c51e541ae2 Move completion_script into commands module 2014-03-02 19:59:35 +01:00
Thomas Scholtes
44c843793b Add completion of plugin commands 2014-03-02 16:18:16 +01:00
Adrian Sampson
86bf8b65ba beet config (#552): show non-existent user path
This makes sure to print out the user's configuration path location even if no
user config file exists. (This makes "BEETSCONFIG=xxx beet config -p" behave
as expected, for instance.) It's a little hacky. Does the approach make sense
to you, @geigerzaehler?
2014-02-28 14:31:38 -08:00
Adrian Sampson
3b2d51e018 backport YAML dumping from Confit (#552)
We actually added more full-blown YAML dumping to the Confit library a while
back but it looks like it never made it into beets. It offers a few benefits
over the hand-rolled flattening that the `config` command was previously
using, including printing ordered dicts in the right order. But it also
appears to have broken logic when attempting to hide defaults. I'll fix this
right quick.
2014-02-28 09:49:29 -08:00
Thomas Scholtes
5c7104adb0 Print warning last 2014-02-28 17:15:04 +01:00
Thomas Scholtes
c345df9155 Merge branch 'config_command'
Conflicts:
	beets/ui/commands.py
	docs/reference/config.rst
	test/_common.py
2014-02-28 16:50:06 +01:00
Thomas Scholtes
74cb897f79 Add warning if completion package not found 2014-02-27 18:16:02 +01:00
Thomas Scholtes
fa6f7622e0 Move completion into beets.ui package and use pkg_resources 2014-02-23 22:16:59 +01:00
Adrian Sampson
1253cb695d move show_model_changes to ui package
This makes it more naturally reusable for plugins.
2014-02-22 15:06:16 -08:00
Adrian Sampson
645279e022 remove old _showdiff
Totally replaced now, including tests! Woohoo.
2014-02-22 14:52:33 -08:00
Adrian Sampson
ace34a8654 _show_model_changes: silence by default
This lets the first line of output be suppressed (as it was previously in
update and write) when no changes at all need to be printed.
2014-02-22 14:32:34 -08:00
Adrian Sampson
1413a842f7 update: restore "deleted" indication 2014-02-22 00:51:05 -05:00
Adrian Sampson
e42fcd973c use _show_model_change in update 2014-02-22 00:41:28 -05:00
Adrian Sampson
f6c19adc55 use _show_model_changes for write command 2014-02-22 00:24:43 -05:00
Adrian Sampson
8303c71b38 robust difference display for modify
This new alternative to _showdiff takes care of formatting and is better at
highlighting differences for non-string fields. This takes care of the issue
where "True -> False" would have everything but the "e" highlighted.
2014-02-22 00:14:18 -05:00
Thomas Scholtes
14ece207c9 Add completion command
The command prints a shell script that provides completion for the `beet`
command. To test it run `eval "$(beet completion)"` in your shell.

I also included some crude testing for this. The `test/test_completion.sh`
script runs tests in a shell and exit with a non-zero status code if the tests
fail. It assumes that the completion script is already loaded in the executing
shell.

As of now the completion only works for bash 4.1 and newer.
2014-02-20 01:15:03 +01:00
Thomas Scholtes
c8e32f6bef Add config command 2014-02-18 20:56:08 +01:00
Adrian Sampson
a2075d31e5 modify: use formatted values in _showdiff()
Perhaps we should use this for other commands also. One outstanding issue is
strange highlighting (e.g., "True -> False" helpfully shows that the "e" did
not change).
2014-02-13 21:33:58 -08:00
Adrian Sampson
be31ac683a Model._parse() class method 2014-02-13 21:29:17 -08:00
Adrian Sampson
b1d70eee39 modify: remove special parsing logic
This could be nicer, but at least we now use standard type-based parsing.
2014-02-13 21:22:23 -08:00
Adrian Sampson
cb783d11c3 style and changelog for #525 2014-02-04 23:19:34 -08:00
Bruno Tournay
1f46ff4604 In beet modify: don't ask for confirmation if there is nothing to do 2014-02-03 22:17:57 +01:00
Thomas Scholtes
6a872ae560 Add --group-albums cli option 2014-02-01 15:36:11 +01:00
Thomas Scholtes
736835ce72 Rename as aLbums option (#518) 2014-02-01 12:56:17 +01:00
Adrian Sampson
5a35d93b22 tiny option-choosing fixes for #518
* 'L' check needs to be lower-case
* letter for 'More candidates' is M, not C
2014-01-31 16:57:07 -08:00
Thomas Scholtes
af522e2416 Use L as shortcut 2014-01-28 23:37:05 +01:00
Thomas Scholtes
d12a4b20da Import multiple albums from single directory
If a directory contains multiple albums we can select the ALBUMS action to group
the tracks by album artist and album name and import those seperately.
2014-01-28 23:22:00 +01:00
Adrian Sampson
8ca997bd36 avoid repeating diff check, use changed set (#511)
This way, _showdiff returns the information that _different used to provide
(since _showdiff needs to calculate it anyway). Using a `changed` set also
makes it easier to avoid unnecessary work.
2014-01-28 09:46:53 -08:00
Bruno Tournay
68bb0ca5ee Removed duplicated code: modified showdiff() so it uses also different() 2014-01-28 14:21:45 +01:00
Bruno Tournay
e7c8b16480 Removed dont_write_if_unchanged config option: now files tags are never updated unless db tags are changed (with beet modify) 2014-01-28 14:00:51 +01:00
Bruno Tournay
0889052831 Added option for not writing tags to file, when tags in db are not modified when running beet modify 2014-01-27 22:05:55 +01:00
Thomas Scholtes
1f53b658bb Use default beets logger 2014-01-20 19:25:55 +01:00
Adrian Sampson
a9faa9bf74 restore correct formatting of paths
- don't sanitize paths (this is already done separately)
- album.path (or album['path']) is now an alias for album.item_dir(), which
  restores the formatting of $path in templates
2013-12-25 00:00:12 -08:00
Adrian Sampson
314438b8fa slightly simpler "write" command (#328, #448) 2013-11-25 15:26:11 -08:00
Heinz Wiesinger
d1a7408ecf Add raw version of a write command. 2013-11-06 21:39:12 +01:00
Adrian Sampson
733c633674 clean up some string formatting 2013-10-06 10:07:28 -07:00
Adrian Sampson
6d07b7e4b5 use _dirty.discard, not _dirty.remove
In the case where the field has not actually changed, don't throw a KeyError;
just proceed silently.
2013-10-06 10:03:24 -07:00
Adrian Sampson
25b77b1518 per_disc_numbering: fix tracktotal (close #163) 2013-09-21 19:12:18 -07:00
Adrian Sampson
22d5e564c6 move move method to model objects 2013-09-16 22:12:26 -07:00
Adrian Sampson
76b1ee434e move remove method to model objects
--HG--
extra : amend_source : 31d3ccbdde816b82bb5ec943ecb870e0df699dd0
2013-09-16 21:30:55 -07:00
Adrian Sampson
267f5a9be1 link to new FAQ location 2013-09-16 20:17:03 -07:00
Adrian Sampson
c7fe017752 remove Library.{move,store} methods
These methods are now provided by LibModel, which makes dealing with items and
albums symmetric.
2013-08-21 15:34:45 -07:00
Adrian Sampson
deef7f9d20 a few more necessary album.store()s 2013-08-21 11:23:09 -07:00
Adrian Sampson
6677cea036 fix uses of item.dirty and item.record 2013-08-21 10:57:52 -07:00
Adrian Sampson
276ce14dd2 flexattrs work for Albums
A second base class, LibModel, maintains a reference to the Library and should
take care of database-related tasks like load and store. This is the beginning
of the end of the terrible incongruity between Item and Album objects (only
the latter had a library reference). More refactoring to come.

One large side effect: Album objects no longer automatically store
modifications. You have to call album.store(). Several places in the code
assume otherwise; they need cleaning up.

ResultIterator is now polymorphic (it takes a type parameter, which must be a
subclass of LibModel).
2013-08-16 18:36:30 -07:00
Adrian Sampson
1a0d9c507d drop flexattr namespaces
Namespaces were a worthy idea, but they added a lot of complexity to both the
library code itself and every client of the flexattrs interfaces. Getting rid
of them, and having one flat namespace of both traditional fields and
flexattrs, has one huge benefit: we can "promote" flexattrs to real attributes
(and vice versa) without code changes in every client.

This frees us to have a somewhat less efficient implementation of flexattrs
because we have a smooth upgrade path for making attributes more efficient via
promotion.
2013-08-16 11:18:05 -07:00
Adrian Sampson
3b9b39e5c9 merge with master 2013-08-15 18:14:33 -07:00
Adrian Sampson
d32e13a63e show data URL for track matches
That should be the last one.
2013-06-12 16:42:15 -07:00
Adrian Sampson
829626d757 show penalties/disambig in track listing
This is the second step in bringing parity between the album and item
displays. Fortunately, we get to reuse most of the code.
2013-06-12 16:39:43 -07:00
Adrian Sampson
94aebd6bca show penalties and disambig for tracks
This makes the UI for track match display match that for album display.
2013-06-12 16:31:42 -07:00
Adrian Sampson
7983c94ef8 add keys() method to Distance 2013-06-10 15:40:51 -07:00
Adrian Sampson
c818663539 replace Distance.sorted() with .items()
This is an effort to make the distance object feel slightly more dict-like.
The name changed and order of tuples is reversed: we now yield (key, value)
instead of (value, key), which I think is a little more intuitive.
2013-06-10 15:31:25 -07:00
Tai Lee
5ce996df0d Revert "Don't bypass candidate selection in timid mode. Always show all candidates."
This reverts commit b02974f68f.
2013-06-06 10:18:01 +10:00
Tai Lee
ea1becfea1 Add Distance.__iter__() and Distance.__len__(), for convenience. 2013-06-06 09:51:17 +10:00
Tai Lee
b02974f68f Don't bypass candidate selection in timid mode. Always show all candidates.
Saves paranoid and interested users from having to either force all max
recommendations to none or constantly go back to candidate selection
from a recommendation to see if there is another slightly less similar
but more preferred (by the user) candidate.
2013-06-03 01:20:32 +10:00
Tai Lee
461c3c047c Colour benign track index changes in light gray, consistent with non-penalty supplementary information. 2013-06-03 00:46:40 +10:00
Tai Lee
ad52ede736 Code style. Use "_" when expanding variables we don't need. 2013-06-03 00:36:01 +10:00
Tai Lee
809ea8c7f9 Exclude zero value penalties from Distance.sorted. 2013-06-03 00:20:19 +10:00
Tai Lee
f6492e68ee Doc string update. 2013-06-02 23:16:28 +10:00
Tai Lee
e6ac8e1646 Use a Distance object instead of floats for distance calculations.
The new Distance object knows how to perform various types of distance
calculations (expression, equality, number, priority, string).

It will keep track of each individual penalty that has been applied so
that we can utilise that information in the UI and when making decisions
about the recommendation level.

We now display the top 3 penalties (sorted by weight) on the release
list (and "..." if there are more than 3), and we display all penalties
on the album info line and track change line.

The implementation of the `max_rec` setting has been simplified by
removing duplicate validation and instead looking at the penalties that
have been applied to a distance. As a result, we can now configure a
maximum recommendation for any penalty that might be applied.

We have a few new checks when calculating album distance:

`match: preferred: countries` and `match: preferred: media` can each be
set to a list of countries and media in order of your preference. These
are empty by default. A value that matches the first item will have no
penalty, and a value that doesn't match any item will have an unweighted
penalty of 1.0.

If `match: preferred: original_year` is set to "yes", beets will apply
an unweighted penalty of 1.0 for each year of difference between the
release year and the original year.

We now configure individual weights for `mediums` (disctotal), `label`,
`catalognum`, `country` and `albumdisambig` instead of a single generic
`minor` weight. This gives more control, but more importantly separates
and names the applied penalties so that the UI can convey exactly which
fields have contributed to the overall distance penalty.

Likewise, `missing tracks` and `unmatched tracks` are penalised and
displayed in the UI separately, instead of a combined `partial` penalty.

Display non-MusicBrainz source in the disambiguation string, and
"source" in the list of penalties if a release is penalised for being
a non-MusicBrainz.
2013-06-02 18:25:10 +10:00
Tai Lee
0a448a2380 Display album disambiguation information in order of common importance. Media, year, country, label, albumdisambig. 2013-05-30 23:28:33 +10:00
Adrian Sampson
303cd9ba00 Merge pull request #291 from jbaiter/discogs_albumid
Support for manually entered IDs in plugins
2013-05-29 14:43:59 -07:00
Adrian Sampson
a0cb31956d distinguish Album and Item template fields
An earlier change (due to @pedros) added the ability for plugins to define
template fields that work with Albums as well as Items. This enables some
cool new use cases but required that every template field definition check the
type of its arguments. Instead, this iteration on the idea distinguishes
between fields meant for Items and those meant for Albums.

In addition to simplifying the implementation of these functions, this also
enables the creation of album fields with identical names to item fields.
(For example, a user contacted me recently about adding a $bitrate field for
albums, which would be the average bitrate of the items. They can do this now
using a plugin.)

I also changed the docs to stop using the decorator approach to registering
template fields. We're moving toward removing those.
2013-05-28 22:30:23 -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
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
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
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
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
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
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
Tai Lee
2420c3de66 Colorize parenthesis around partial match message. 2013-05-23 17:58:04 +10:00
Tai Lee
7672fafc7e Colorize benign track index changes (to/from per disc numbering) in yellow. 2013-05-23 17:58:04 +10:00
Tai Lee
a2942895cc Display album ambiguation on info line (after similarity and source). Colorise disambiguation light grey for subtle distinction from album text. 2013-05-23 17:58:03 +10:00
Tai Lee
d1548c1178 Indent album title and artist when there are no changes for consistency with when there are (and easier to read?) 2013-05-23 17:58:03 +10:00
Tai Lee
2d04285ebc Don't colorise the "()" around partial match text. For consistency (and a little easier to read?) 2013-05-23 17:58:03 +10:00
Tai Lee
2fda231004 Abstract method to determine if track number has changed.
This is a little more accurate than the previous method (check if track
is in index or medium_index) by looking at the `per_disc_numbering`
setting and comparing the index or medium index accordingly.

It's also a little more accurate in the display output by diffing the
combined `disc-track` to `medium-medium_index` (if using per disc
numbering) and intelligently colorizing the either the whole track
number or just the suffix.
2013-05-23 17:58:03 +10:00
Adrian Sampson
27071a6e38 discogs: tweak colorization & installation docs
I thought having "MusicBrainz" colored green was a little distracting since
it's the common case (and universal without the discogs plugin), so this just
makes it neutral-color in that case.
2013-05-21 17:59:17 -07:00
Tai Lee
75a4171d20 Merge branch 'master' of github.com:sampsyo/beets into imenem-discogs-search
Conflicts:
	docs/changelog.rst
	docs/plugins/index.rst
2013-05-21 23:27:53 +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
916ceb4b15 changelog and tweaks for #275
I've removed the -p option. The command now always shows plugin-provided
template fields if any are available. We also avoid printing out blank lines
for plugins that don't provide fields.
2013-05-17 11:55:17 -07:00
Pedro Silva
4f5faeccac Append plugin template fields to 'beet fields' output with -p, --plugins 2013-05-15 13:41:54 +01:00
Adrian Sampson
c1815a5d72 FIELDS lists use real types instead of SQL strings
This should enable some useful simplifications down the road.
2013-05-11 16:41:04 -07:00
Adrian Sampson
6f77169ad2 itime (#264): name change
I changed the "itime" field to "added" and the %format function to %time.
2013-05-11 13:24:23 -07:00
Lucas Duailibe
4d5773c195 Support for date/time fields 2013-05-11 10:53:43 -03:00
Adrian Sampson
ba288ce604 move type conversion to commands module (#265)
This change also uses the existing str2bool utility function.
2013-05-08 22:56:27 -07:00
Adrian Sampson
bc5e045592 Merge pull request #265 from duailibe/modify
"Modify" for non-string values
2013-05-08 22:38:25 -07:00
Adrian Sampson
8d0449c23d rewrap and changelog note for #267 2013-05-08 22:31:53 -07:00
Jayme
9ed6c671fa Print number of tracks on disc to simplify the decision of switching to singleton mode 2013-05-06 18:55:06 +02:00
Lucas Duailibe
c7f4b8a095 "Modify" for non-string values
Added the possibility to modify float, integer e bool values (using explicitly true/false)
2013-05-05 20:22:38 -03:00
Lucas Duailibe
51ed0939d6 fixing things 2013-03-25 15:20:38 -03:00
Lucas Duailibe
56c53acbab human-friendly error messages (#125) 2013-03-25 11:24:42 -03:00
Adrian Sampson
d41fb7f0ea merge with master
We should work off the latest changes because of the recent changes to the
Query class hierarchy.
2013-03-16 12:50:55 -07:00
Lucas Duailibe
f6c3e4652c fix unicode error 2013-03-10 18:12:16 -03:00
Adrian Sampson
3e05d6614c get and set flexattrs with hyphen keys
Here's another little experiment: to make flexattrs a little easier to use for
end users, you can now get and set them by using 'namespace-key' as the
argument to __getattr__ or __setattr__.

For example, try:
$ beet mod foo-bar=baz
$ beet ls -f '${foo-bar}'
baz
baz
baz
...
2013-03-09 13:16:24 -08:00
Adrian Sampson
f268aae17f add --flat option to import command (GC-202) 2013-02-26 20:59:52 -08:00
Adrian Sampson
706c4fb7f6 import.detail config option (GC-263) 2013-02-26 20:36:29 -08:00
Adrian Sampson
0c487f479a remove AutotagError dead code
Another silly mistake identified by the RIT testing team.
2013-02-16 16:39:21 -08:00
Adrian Sampson
0366dc8184 fix "import -l logpath" CLI option (GC-518) 2013-02-16 14:58:53 -08:00
Adrian Sampson
151177ab95 recommendation is now a "real" enumeration 2013-02-07 17:26:58 -08:00
Adrian Sampson
67845f3fb5 use unicode for import log
We pass all the paths involved through displayable_path now.
2013-02-03 18:47:31 -08:00
Adrian Sampson
99ed9e03de rename ImportTask.path to paths (#89) 2013-02-03 11:22:27 -08:00
Tai Lee
23cd5453d9 Improved multi-disc album detection.
- Remove "part", "volume", "vol." multi-disc markers. These are often
  part of album titles, and not necessarily indicative of a multi-disc
  album. Only look for "CD X" and "disc X" (case insensitive), ignoring
  white space and other non-word characters.

- Don't only expect each disc to be in a subdirectory of a common parent
  directory, with all siblings belonging to the same release. Also match
  any consecutive siblings (even when the parent contains other albums)
  that are named with the same prefix and multi-disc marker.

- The `albums_in_dir(path)` function now always yields a list of paths
  along with each list of items. `ItemTask.path` is now always a list of
  paths.

- The `displayable_path(path)` function now accepts a list of paths, and
  will join them with "; " by default. This can be changed with the
  `separator` argument.

- The `sorted_walk()` function now does a case insensitive sort on
  directories, but still returns case sensitive results. This allows
  better multi-disc album detection.

- The `art_for_album()` function now takes a list of paths as its second
  argument, instead of a single path.
2013-02-03 23:51:31 +11:00
Adrian Sampson
5f5d3f13c5 Merge pull request #87 from pscn/master
Use release disambiguation not release-group disambiguation and more
2013-02-02 12:33:03 -08:00
Adrian Sampson
44d195a119 suffix-based colorization for numeric value diffs 2013-02-02 12:24:05 -08:00
Adrian Sampson
d050211c2c length_diff_thresh moved to config
This was previously hard-coded as 2.0 seconds, which was way too low.
2013-02-02 12:07:58 -08:00
Adrian Sampson
afd35ee17a don't colorize filenames in track diff display 2013-02-02 12:02:58 -08:00
Adrian Sampson
f54d9bc096 refactoring and commenting for legibility (#82) 2013-02-02 11:43:19 -08:00
Adrian Sampson
13c71757f2 cross-platform and error-tolerant width check (#82) 2013-02-02 11:19:23 -08:00
Tai Lee
06976bb49d De-duplicate loop functionality. One logic loop and one display loop. 2013-02-02 09:11:12 +11:00
Peter Schnebel
9fa3aa7428 Prefix media with number of media if >1 (e.g. 2xCD, 3xVinyl...)
Show MBs disambiguation if set.
2013-02-01 15:48:15 +01:00
Tai Lee
8afe1c71b1 Improved change alignment. Align "->" when possible, otherwise split across two lines. 2013-02-01 17:29:30 +11:00
Adrian Sampson
8ae40e9945 changelog and style fix for #81 2013-01-31 16:25:02 -08:00
Adrian Sampson
20dd71fcfd Merge pull request #81 from pscn/master
Show media in candidates disambiguation
2013-01-31 16:04:17 -08:00
Tai Lee
bf1edcdb71 Check none_rec_action setting instead of quiet_fallback during interactive import. 2013-01-31 23:51:51 +11:00
Adrian Sampson
1ef35f8b07 merge none_rec_action logic with quiet logic (#77)
This refactoring helps alleviate some of my own copypasta where we handle quiet
mode and its fallback. It has the added benefit of making none_rec_action work
for singletons as well as albums.
2013-01-30 21:03:05 -08:00
Adrian Sampson
521a4d1ebd Merge pull request #77 from mrmachine/none-rec-action
For matches with no recommendation, import as-is or skip automatically.
2013-01-30 20:38:12 -08:00
Adrian Sampson
ee641e9b13 default_action config option, et cetera (#76)
- Partial matches are always downgraded to a "medium" match.
- The config option, now called "default_action", lets you choose what to do
  with "medium" matches.
- Expanded the "low" recommendation level to include cases with just one
  match.
2013-01-30 20:32:37 -08:00
Adrian Sampson
00dfa33249 Merge pull request #76 from mrmachine/safer-defaults
Safer defaults
2013-01-30 19:41:24 -08:00
Adrian Sampson
486dd210ae trying out a multi-line track display (#78) 2013-01-30 19:23:53 -08:00
Peter Schnebel
a5fdf2ed4b show media in candidates disambiguation 2013-01-30 16:44:57 +01:00
Tai Lee
e7988de60b Align LHS and RHS changes. Put track/duration differences on RHS. 2013-01-29 14:40:03 +11:00
Tai Lee
25951e4d74 For matches with no recommendation, import as-is or skip automatically.
Add `import: none_rec_action` setting with a default of "ask" (current
behaviour). If set to "asis" or "skip", matches with no recommendation will be
imported as-is or skipped automatically.
2013-01-29 12:35:27 +11:00
Tai Lee
e923f673cb Safer defaults on confirmation prompts.
Remove default option and require selection on confirmation prompts for:

- Partial matches, if `import: confirm_partial` setting is "yes".
- Matches that are below the medium recommendation threshold, but above the
  gap threshold.
- Matches that have no recommendation.
- Matches other than the best and auto-suggested match.
2013-01-29 12:29:19 +11:00
Adrian Sampson
9e6b1db02d configurable match thresholds (GC-290) 2013-01-11 14:46:15 -08: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
0fdda2fe0b implicit colorization conditional
This simplifies many points in the code where the "color" option had to be
checked by centralizing these checks.
2012-12-30 17:18:14 -08:00
Adrian Sampson
392f9861e0 allow the import log path to be None 2012-12-23 18:06:55 -08:00
Adrian Sampson
3c511b9e27 rename Confit's add_args to set_args 2012-12-20 17:14:04 -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
e17cd6beba merge lots of work on the stable branch 2012-12-12 19:14:30 -08:00
Adrian Sampson
859268f707 decode Unicode arguments to import -L (GC-457) 2012-11-06 14:29:58 -08:00
Adrian Sampson
7158c01ff8 clean up outdated FIXMEs 2012-10-27 18:47:04 -07:00
Adrian Sampson
1de53446f8 fix outdated config references 2012-10-27 18:39:28 -07:00
Adrian Sampson
a50397f2a4 fix a few old config references in importer 2012-10-26 20:54:37 -07:00
Adrian Sampson
ac8109bb5f fix calls to _pick_format 2012-10-26 20:19:33 -07:00
Adrian Sampson
1ee304e105 remove config argument in command function sigs 2012-10-26 20:13:23 -07:00
Adrian Sampson
20d1485c90 remove some lingering ImportConfig references 2012-10-26 20:10:52 -07:00
Adrian Sampson
815fc83cb4 merge fixes and additions from master 2012-10-26 19:54:26 -07:00
Jakob Schnitzer
d6f20e91bd Speedup 'beet ls' if no format is specified 2012-10-21 13:54:24 +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
2770b7d6fc #62: move format/print utilities to beets.ui
Now that these functions are generally useful, this is the right home for them.
Plugins should also use print_obj.
2012-10-20 20:55:14 -07:00
Adrian Sampson
93a7251b57 #62: use list_format_* in non-list commands
The list_format_album and list_format_item options now *actually* affect the
display in commands other than "beet list". This replaces the -f/--format flags
-- if any users want to control this on the command line, we can reconsider this
decision.

Note that this involved passing around a "config" object, which we previously
haven't done. This seems a little bit messy, but configuration is about to
change entirely to be more like this style -- so this isn't a huge liability.
2012-10-20 20:50:03 -07:00
Adrian Sampson
3952fbec62 docs & changelog for pervasive format config (#62)
This version of the (renamed) _print_obj function uses introspection to
determine whether we're printing an Album or an Item. It's like function
overloading for Python! 😁
2012-10-20 20:29:49 -07:00
Adrian Sampson
c0a04dc788 Merge pull request #62 from mk-fg/unified_presentation_format
Unified presentation format in ui commands
2012-10-20 20:07:15 -07:00
Mike Kazantsev
037f290776 ui: add --format option to all commands that can use it 2012-10-20 23:06:58 +06:00
Mike Kazantsev
f8cf3817fc ui: use configured format when printing album/item from all commands 2012-10-20 22:58:05 +06:00
Mike Kazantsev
8b07ea157d Fix inconsistent three-space indentation 2012-10-20 21:45:14 +06:00
Jakob Schnitzer
cf32eb9532 Add --exact argument to stats 2012-10-05 20:56:09 +02:00
Adrian Sampson
009bd389e7 the ImportSession class
ImportSession will replace ImportConfig. It will have a *sane* number of fields
that are specific to the particular invocation of the importer -- e.g., lib and
paths. It also has a little bit of logic attached. Finally, it provides a method
for hooking the callbacks into the UI that is more elegant than assigning
callback functions -- OO inheritance to the rescue!
2012-09-09 23:06:57 -07:00
Adrian Sampson
75d43270e8 begin moving importer/autotagger to confit 2012-09-09 22:30:48 -07:00
Adrian Sampson
9d2511546b eradicate config_val from most built-in commands 2012-08-31 18:37:31 -07:00
Adrian Sampson
8bc563fafc confit: fix unicode and numeric validation 2012-08-30 23:00:01 -07:00
Adrian Sampson
fe2a68722f add Confit and start config changeover
This adds a snapshot of the current Confit source (not a crime because Confit is
currently unreleased). It also changes around the bootstrapping mechanisms
enough to let "beet ls" run with the new Confit-based configuration. There's
much more to do.
2012-08-30 17:04:44 -07:00
Adrian Sampson
b20367dd41 import: allow relative paths on Windows 2012-07-17 12:00:27 -07:00
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
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
11d4fb1abb move album art fetching to a plugin (fetchart) 2012-06-24 00:34:50 -07:00
Adrian Sampson
7e6e5e5dca nicer error message when stdin is EOF'd 2012-06-21 17:37:45 -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
2ede4b3ec7 show per-disc numbers in change preview (GC-335) 2012-05-19 11:30:00 -07:00
Adrian Sampson
427e2017d6 don't display difference when medium index matches
Regarding GC-335, the difference display was confusing when the track indices
were correct but used a per-disc numbering scheme.
2012-05-19 11:06:47 -07:00
Adrian Sampson
2b000c47a2 per_disc_numbering config option (GC-335) 2012-05-17 12:44:48 -07:00
Adrian Sampson
9979c5a826 separate config options for item and album formats
Extends GC-362 (GH-38) to use two different config options: one for albums and
one for items.
2012-05-16 17:01:14 -07:00
Fabrice Laporte
42c51294d6 Merge pull request #38 from KraYmer/master
Issue 362: Make the default template string for the list command configurable
2012-05-16 15:59:22 -07:00
kraymer
81fc626ba7 Issue 362:Make the default template string for the list command configurable. 2012-05-17 00:48:55 +02: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
6ce08c4ce6 merge 2012-05-08 11:59:41 -07:00
Adrian Sampson
f0ae35bc4a Python 2.6 on TravisCI 2012-05-08 11:59:10 -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
a2c12dc78f -c CLI option overrides import_move config option 2012-05-03 17:19:28 -07:00
Adrian Sampson
1ee07e116e flexible -f templates for album listings (and rdm) 2012-04-30 22:59:17 -07:00
Adrian Sampson
ef45461cf9 evaluate_template is now a method on Item 2012-04-30 21:40:02 -07:00
Adrian Sampson
792c5b5e5d cleanup and docs for -f option flexibility 2012-04-30 21:26:49 -07:00
Steve Dougherty
c93e7e443e Run functions and substitute fields in list format strings. 2012-04-29 11:11:57 -04:00
Adrian Sampson
a64dea25b2 docs for @djrtl's changes (#30) 2012-04-15 14:24:52 -07:00
Matteo Mecucci
594dca3529 Added the shortcut -I for --no-incremental. 2012-04-15 19:10:52 +02:00
Matteo Mecucci
2a76a60794 Added --no-incremental option to beet import. 2012-04-15 17:05:30 +02:00
Matteo Mecucci
1ebe1cf728 Added fields command to output a list of available fields for queries and format strings. 2012-04-15 16:57:44 +02:00
Adrian Sampson
6b696c842f cleanup and docs for import_move (GH-26, GC-266)
- Copying and moving are mutually exclusive. Moving overrides copying so the
  user only has to add one line ("import_move: true") to disable copying and
  enable moving in its place.
- Deleting is only possible when copying.
- Deprecating the "delete" option (moving is almost always better).
- Removed command-line switch for moving. It's somewhat "unsafe", so this
  removes some potential for accidental irreversible changes.
- Changelog & thanks.
- Update docs to refer to import_move instead of import_delete as the
  correct solution for ending up with only one copy of the file.
2012-04-10 13:41:24 -07:00
Adrian Sampson
d256aeb436 Merge pull request #26 from iElectric/master
import_move: move files (instead of copying & deleting)
2012-04-10 13:02:30 -07:00
Adrian Sampson
9c05f0ab7b link to FAQ on no match (GH-27) 2012-04-10 12:33:16 -07:00
Domen Kožar
1af4f86c17 support move action when importing 2012-04-05 01:14:17 +02:00
Adrian Sampson
037f751e23 display track count for failed album matches 2012-03-27 10:24:27 -07:00
Adrian Sampson
34ec25e642 appropriate logging for duplicate resolution 2012-03-20 13:13:52 -07:00
Adrian Sampson
71762375c9 skip duplicate prompt in quiet mode
In quiet mode, duplicates are skipped. We can add a new config option if people
really want to customize this.
2012-03-20 13:02:02 -07:00
Adrian Sampson
ced4e1ace8 duplicate resolution prompt (#164)
"Skip" and "keep both" work already, but "remove old" does not. It sets a flag
on the import task object; this flag should then be read by the apply_choices
coroutine, where appropriate action should be taken as part of the same
transaction that adds stuff to the DB.

Unresolved questions:
- Should old files be deleted? (How is this decided? Based on config parameters,
  or with another prompt option?)
- Logging details.
- Folder naming. If I have two albums with the same name, I want them in
  different directories.
- Quiet mode. Currently, there are no checks -- the prompt should not be made in
  quiet mode. (In that case, what should it do?)
2012-03-19 15:46:05 -07:00
Adrian Sampson
19b08f8e99 duplicate resolution callback function (#164) 2012-03-19 15:32:53 -07:00
Adrian Sampson
1b1b8c4ae3 cleanup/docs for list formatting (#203; #22 on GH) 2012-03-14 14:51:13 -07:00
Philippe Mongeau
200a98d4df add format option to list_items command
you can provide a custom format option to the list
command.
Example: $ beet ls -f '$title - $album'
2012-02-29 19:14:56 -05:00
Adrian Sampson
982f5849e2 show track lengths in difference display (#121) 2012-02-19 13:06:36 -08:00
Adrian Sampson
531ebd19bb import log: flush on write; close on crash (#337) 2012-02-19 12:40:44 -08:00
Adrian Sampson
23e30bf72a CLI error when log file can't be opened (#326) 2012-01-30 16:29:22 -08:00
Adrian Sampson
307560a6c9 ignore all .* files by default (#293) 2012-01-16 17:09:25 -08:00
Adrian Sampson
c0115ad958 ignore .fuse_hidden* files 2011-12-17 21:55:12 -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
0b5a47a745 Merge pull request #13 from laarmen/feature/incomplete_albums
Tag incomplete albums (#260 on Google Code)
2011-12-01 13:04:11 -08:00
Simon Chopin
7aaab602c0 ui.commands: Warn the user when the candidates are partial matches 2011-11-24 16:03:56 +01:00
Simon Chopin
9a7a551d92 Enable import of incomplete albums
This commit disables the autoreject for incomplete albums. There is
several one-liner fixes in autotag/__init__.py and importer.py, as well
as some UI additions to report to the user when a track seems missing.
2011-11-22 13:47:36 +01:00
Adrian Sampson
78dca315d4 slightly clean up mtime feature; changelog mention 2011-11-22 00:11:45 -08:00
Jos van der Til
f150d76b55 Handled the case where file_mtime was changed, but no metadata was changed
--HG--
extra : transplant_source : %D0%DB%B1r%1D%CAh%23%3D%0C%E0%90%21%CA%7B%97%CE%F0u%19
2011-11-21 20:41:43 +01:00
Jos van der Til
2c81ee736c Implemented file modified time tracking to beets.
Only files which were modified after beets checked them will be checked again.
Implements feature request #227

--HG--
extra : transplant_source : K%F1d%C5%B1%1F%CA%AB%95ck%8C%AC%25m%F0%26%E4%9DB
2011-11-21 19:51:16 +01:00
Adrian Sampson
55d7869adc remove subscripting of info objects in candidate menu (fixes #253) 2011-11-19 17:59:47 -08:00
Adrian Sampson
5965b37f51 skip (configurable) clutter filenames when importing 2011-11-13 17:14:40 -08:00
Adrian Sampson
7e627c5e57 decode pathnames before formatting them (#232) 2011-11-13 10:10:19 -08:00
Adrian Sampson
4f2fe61ddc make some unicode types explicit (for #232) 2011-11-12 16:45:56 -08:00
Adrian Sampson
95f38dbe52 "info dictionaries" replaced with AlbumInfo and TrackInfo 2011-10-23 14:12:13 -07:00
Adrian Sampson
948f7effd2 fix logging of unicode pathnames
(reported by HMS on IRC today)
2011-11-28 16:06:33 -08:00
Adrian Sampson
ec49fca4dc smarter MBID input (based on patch by derwin) 2011-10-07 15:33:19 -07:00
Adrian Sampson
4b5c674d9b "--pretend" (dry run) flag for update 2011-09-18 16:18:19 -07:00
Adrian Sampson
748457193b fix colorized diff of non-string values (#236) 2011-09-18 12:36:52 -07:00
Adrian Sampson
e0f66d6f18 epsilon tolerance in float equality for showdiff 2011-09-18 12:29:07 -07:00
Adrian Sampson
42e0b6c950 special-case albumartist update to avoid undoing inference for as-is imports 2011-09-18 12:22:20 -07:00
Adrian Sampson
9933b5e4df difference display was showing the same value twice (#236) 2011-09-18 12:10:10 -07:00
Adrian Sampson
e8b8cb179f refactor: move() is a method on Library (not Item) 2011-09-15 16:15:53 -07:00
Adrian Sampson
e2b7a7514d fix visual diff for non-string values (#235) 2011-09-15 14:45:31 -07:00
Adrian Sampson
607757edf1 -i/import_incremental to only import new directories (#99) 2011-08-09 12:09:36 -07:00
Adrian Sampson
45eeea343e destination option for "beet move" (also tests) 2011-08-05 12:19:34 -07:00
Adrian Sampson
99b7cb8854 initial iteration of "move" command (#106) 2011-08-05 11:52:13 -07:00
Adrian Sampson
3efeb9a133 -L flag to import lets you re-import items matching query (#69) 2011-08-04 15:29:59 -07:00
Adrian Sampson
e84c3e7abd consolidate update command, removing album-munging logic 2011-08-02 23:37:55 -07:00
Adrian Sampson
fdf697dc90 merge in wlof's "update" command 2011-08-02 20:43:21 -07:00
Adrian Sampson
e24ebbae00 add --yes (-y) option for skipping modify confirmation 2011-08-02 14:10:03 -07:00
Adrian Sampson
a367b2764d first attempt at command-line modification command (#56) 2011-08-02 13:59:33 -07:00
wlof
2495227724 Detect deleted files
Display detected modifications
2011-08-02 21:20:23 +02:00
wlof
fca60c510e update feature (issue 107) 2011-08-01 04:59:20 +02:00
Adrian Sampson
fed8782ca1 fix Unicode queries from CLI arguments 2011-07-01 15:43:06 -07:00
Adrian Sampson
2bc3892384 show filename when title is empty (#213) 2011-06-29 08:35:56 -07:00
Adrian Sampson
fcc2744ac5 use separate shell arguments for queries to preserve whitespace 2011-06-26 00:12:45 -07:00
Adrian Sampson
453162d268 label and year shown in candidate list (#197) 2011-06-25 13:54:02 -07:00
Adrian Sampson
a074db78e1 manual specification of MBIDs 2011-05-22 21:18:01 -07:00
Adrian Sampson
da6ee13159 fix singleton quiet imports 2011-05-21 16:53:01 -07:00
Adrian Sampson
09bf1179c1 help text typo 2011-05-21 16:26:29 -07:00
Adrian Sampson
39dac9a28d "beet ls -p" outputs paths 2011-05-21 12:40:36 -07:00
Adrian Sampson
3b23198324 singleton imports can take single-file arguments (#184) 2011-05-06 12:27:03 -07:00
Adrian Sampson
8341dee3ab reorder items() and albums() parameters to reflect common use 2011-05-05 17:20:24 -07:00
Adrian Sampson
1a86efc39f timestamps and appending for import log (#155) 2011-05-03 12:34:31 -07:00
Adrian Sampson
2dbfbc8923 import_log config parameter 2011-05-03 12:23:43 -07:00
Adrian Sampson
eeb021367f colorize "options" prompts (#147) 2011-05-03 10:14:42 -07:00
Adrian Sampson
1f67dcd673 fix manual search for singletons 2011-04-28 22:20:40 -07:00
Adrian Sampson
6c1edc792c print "(unknown album)" when no tags are present 2011-04-19 23:30:35 -07:00
Adrian Sampson
3dbce11a25 raise error when -q and -t are supplied together 2011-04-19 13:56:45 -07:00
Adrian Sampson
704a76ba2c rename interactive_autotag to timid 2011-04-19 13:03:14 -07:00
mdecker
2ca26d3d20 bugfix for 251a90e6
now user is not only asked for a manual choice but is also able to choose another album ;)
2011-04-19 14:58:39 +02:00
mdecker
251a90e64d added -i switch to import command to disable fully automatic tagging of highly similar albums
the user will instead be prompted to confirm or change the match
2011-04-18 22:44:35 +02:00
mdecker
53e3ae7c58 fix manual album search that has been broken somewhere around c0467c37 2011-04-18 16:20:32 +02:00
Adrian Sampson
bf5c569884 simplify ImportTask for singletons: use .item instead of items[0] 2011-04-16 23:32:33 -07:00
Adrian Sampson
86b1f92824 fix some (suprisingly few) airplane-coding bugs 2011-04-16 00:42:33 -07:00
Adrian Sampson
ac9c2e6b19 don't offer TRACKS option for singletons
(Yep, still on that plane. Almost there...)
2011-04-15 21:17:29 -07:00
Adrian Sampson
6031f2dac7 much smarter input_options to simplify its callers 2011-04-15 21:11:43 -07:00
Adrian Sampson
375e335002 manual searching for singletons
(Still on a plane.)
2011-04-15 20:14:30 -07:00
Adrian Sampson
69dc998d7c make choose_candidate apply to both items and albums
(I can't try this out right now because I'm on an airplane. That might be true
of the next few commits, too. Horrible errors will be fixed later.)
2011-04-15 19:58:35 -07:00
Adrian Sampson
d1b7c8dc55 display track changes; some scaffolding for user query 2011-04-14 09:07:06 -07:00
Adrian Sampson
45eef6e876 rename -i flag to -s ("singletons") and fix behavior 2011-04-12 23:31:44 -07:00
Adrian Sampson
12854ad2ff very first stab at a working individual-item importer flow
"beet import -i" now tags items instead of albums. There are many loose ends to
tie up (marked with TODOs in the source):
- What to do about applying non-track metadata to matched tracks? Currently it's
  just left in place.
- Plugin autotag candidates for tracks.
- No user querying yet.
- Non-autotagged -i import are unimplemented.
And, on top of those:
- Need to remove the action.TRACKS workflow and replace it with an option that
  lets you jump over to the individual-track interface from the album tagger.
2011-04-12 23:22:03 -07:00
Adrian Sampson
a675988eb2 add and use fancy enumeration module 2011-04-10 22:10:33 -07:00
Adrian Sampson
e669868896 move a bunch of functions to util 2011-04-10 21:48:05 -07:00
Adrian Sampson
3222cc6213 move main importer driver logic to importer module 2011-04-10 19:15:24 -07:00
Adrian Sampson
dffdbce5f1 sanitize CLI-specific code from importer module 2011-04-10 19:10:22 -07:00
Adrian Sampson
c0467c3724 encapsulate importer configuration in an object 2011-04-10 18:56:42 -07:00
Adrian Sampson
23392525ec The Great Importer Refactoring
I'm shuffling around the feature-creeping importer code to keep it as
interface-agnostic as possible. The "importer" module now takes care of the
basic, increasingly complicated workflow while the ui.commands module is
relegated to containing actual user-interface stuff.
2011-04-10 18:12:47 -07:00
Adrian Sampson
aa76be367a invert sense of "if" for readability 2011-04-10 17:43:03 -07:00
Adrian Sampson
6ec349b384 move some logic into ImportTask with should_ methods 2011-04-10 17:40:28 -07:00
Adrian Sampson
11c5b15c8d fix copying destination for full-album imports 2011-04-10 10:57:13 -07:00
Adrian Sampson
e478ae740d refactor importer to use a ImportTask class instead of a tuple 2011-04-09 19:53:52 -07:00
Adrian Sampson
f0adb4efd7 refactor tagger UI simplify choose_match function 2011-04-09 17:25:01 -07:00
Adrian Sampson
7f1e4c2407 "as Tracks" option during import to add singletons 2011-04-09 15:20:15 -07:00
Adrian Sampson
633e878ee8 distance -> similarity (#114) 2011-04-09 14:07:14 -07:00
Adrian Sampson
565257988a docs/whitespace and change register_listener to a class method 2011-04-09 13:15:19 -07:00
Peter B
f0cc11e8ff added 'album_imported' event. 2011-04-09 00:04:24 -04:00
Adrian Sampson
4ce8d3b249 duplicate detection is (belatedly) album-based instead of track-based 2011-04-03 16:12:09 -07:00
mdecker
cd18d7aca4 fix double deletion problem of source files when import_delete is set 2011-04-03 18:43:41 +02:00
Adrian Sampson
4193d5411c bump up the pipeline queue size 2011-04-02 20:50:27 -07:00
Adrian Sampson
1a87483877 hide artist in difference display for VA matches 2011-04-02 20:42:07 -07:00
Adrian Sampson
effc338957 "info" command for dumping file metadata 2011-04-02 19:59:22 -07:00
Adrian Sampson
6b49bb11ae show plugins in "version" output (#153) 2011-04-01 20:42:24 -07:00
Adrian Sampson
cd8ca9f473 make -p/-P and import_resume config option symmetric
The import_resume option (nee import_progress) now exactly reflects the behavior
of -p and -P on the command line, which I think is way less confusing. That
option now has three settings: yes, no, and "ask" (the default). The "ask"
behavior cannot be specified on the command line, but I think that's OK. It's
also important to note that "no" means that progress is disabled entirely
(including saving progress for later resumes). The -q flag still overrides the
config option.
2011-03-30 20:05:42 -07:00
Adrian Sampson
436f635b55 import_quiet_fallback option to customize in quiet mode (#149) 2011-03-29 21:27:03 -07:00
Adrian Sampson
9ae27b0a05 fix ordering of CLI switches 2011-03-29 20:08:42 -07:00
Adrian Sampson
5b13094789 -p and -P flags to force resume or skip resume 2011-03-29 20:02:47 -07:00
Adrian Sampson
098640ee12 quiet import mode disables resuming by default (#150) 2011-03-29 19:38:16 -07:00
Adrian Sampson
aa29f62533 import_progress config option to disable resuming 2011-03-29 19:31:14 -07:00
Adrian Sampson
ecf2da1b6f always show album directory in tagger output 2011-03-23 14:06:14 -07:00
Adrian Sampson
7baf41827d log duplicate albums during import (#141) 2011-03-22 20:21:48 -07:00
Adrian Sampson
d59c66af6a turn on infer_aa in appropriate situations 2011-02-18 12:42:41 -08:00