Commit graph

694 commits

Author SHA1 Message Date
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
Adrian Sampson
993519c004 split import tests, suppress progress checks for testing 2011-02-18 12:38:46 -08:00
Adrian Sampson
56964c7faa documentation and NEWS note about deletion fix (#134) 2011-02-18 11:25:57 -08:00
Ozzi Lee
c15c3ee9ec Log album.albumartist instead of album.artist after import. 2011-02-02 13:08:51 -06:00
Ozzi Lee
6baf9f5351 Fixed a bug where tracks could be deleted on re-import.
Tracks could be deleted when re-importing tracks that are already in
the library directory and import_delete is set to yes.
2011-02-02 13:08:18 -06:00
Adrian Sampson
0c24376e6a migration of album table's artist field to albumartist; fix ls -a 2011-01-23 22:49:52 -08:00
Adrian Sampson
342c360285 apply jonathan.buchanan's compilation patch from issue #48 2011-01-23 18:41:35 -08:00
Adrian Sampson
bff9f2e808 "beet version" command 2011-01-20 09:23:39 -08:00
Adrian Sampson
93594bac5a convert import paths to absolute; more _syspath calls
Again, patch mainly due to jonathan.buchanan.
2011-01-20 00:13:00 -08:00
Adrian Sampson
ca0d1bc7aa fix unicode issue with manual search prompt (#113) 2011-01-18 19:09:04 -08:00
Adrian Sampson
0f79c0f49e fix a silly UnboundLocalError (#116) 2011-01-18 18:22:47 -08:00
Adrian Sampson
8f5ce886ab non-autotagged imports now resumable 2011-01-02 22:22:40 -08:00
Adrian Sampson
d860dd12c3 implement quiet importing 2011-01-01 13:22:20 -08:00
Adrian Sampson
dd08f63e17 fix as-is import flag 2010-10-23 12:12:14 -07:00
Adrian Sampson
1fea4e84d6 fix horrible track ordering bug 2010-10-10 13:19:10 -07:00
Adrian Sampson
14a6a4cf46 rewording 2010-09-28 20:20:06 -07:00
Adrian Sampson
4de44590d0 progress display for non-autotagged imports 2010-09-28 10:29:07 -07:00
Adrian Sampson
d453f5911d merge 2010-09-27 15:32:06 -07:00
Adrian Sampson
6352d055ae fix unavailability of 'aBort' at one prompt 2010-09-22 20:06:00 -07:00
Adrian Sampson
a43624e1e4 config option to delete original files after import 2010-09-21 15:51:55 -07:00
Adrian Sampson
ff3b1f095f fix import logger (was logging parent directories, stupidly) 2010-09-16 14:29:23 -07:00
Adrian Sampson
a384aa948b add a couple more events: "library saved" and "import finished" 2010-08-30 12:59:51 -07:00
Adrian Sampson
a4a6f0a667 fix silly outdated assumption for "imp -A" 2010-08-22 12:18:51 -07:00
Adrian Sampson
8eeaead135 fixed pause & resume, which neither paused nor resumed
In the multithreaded version, the "directory done" state was written before
other progress states, causing it to be overwritten. This was because I had
stupidly put the "done" message in the initial generator, which of course
finishes before the entire pipeline finished. This manifested as two problems:
the tagger would always want to "resume" even when it had finished the last
time; "aBort"ing the process would not cause the next run to resume.
2010-08-04 11:30:02 -07:00
Adrian Sampson
4239c08127 add aBort option for all tagger UI inputs 2010-08-02 16:32:16 -07:00
Adrian Sampson
477c4bf3ba use None instead of pipeline.BUBBLE to indicate skips
This makes the apply_choices coroutine run even for albums that are skipped or
still in the library. This (along with making things more predictable) lets the
apply_choices stage write the progress value as albums are retired even if they
are skipped.
2010-08-02 16:15:08 -07:00
Adrian Sampson
9da55376db basic resuming of crashed tagging via .beetsstate file 2010-08-02 16:08:49 -07:00
Adrian Sampson
8ee6b18e1d colorize distances in tagger output 2010-08-01 16:15:52 -07:00
Adrian Sampson
1b5a2afd35 initial autotagger output coloring (of titles and tracks only) 2010-08-01 15:35:11 -07:00
Adrian Sampson
957b414f97 code cleanup and NEWS for parallel tagger 2010-07-31 19:23:14 -07:00
Adrian Sampson
ee6b15b367 abstract pipeline implementation into its own module 2010-07-31 19:12:10 -07:00
Adrian Sampson
45ee9b210c initial ad-hoc implementation of threaded tagger 2010-07-31 17:02:25 -07:00
Adrian Sampson
2fecb1c8e8 refactor autotagger UI again into coroutines 2010-07-31 16:06:07 -07:00
Adrian Sampson
fb7773ba46 fixed deleting of albums (rm -a): now deletes album entry 2010-07-29 11:10:59 -07:00
Adrian Sampson
5a10fb446e tagger refactoring in preparation for concurrent tagging 2010-07-29 10:57:10 -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
c62b1355f1 don't fetch art when importing as-is 2010-07-21 10:30:23 -07:00
Adrian Sampson
602f896bd1 import -A now tags albums
Previously, importing without autotagging just imported a bunch of Items. Now,
like the autotagging version, "import -A" creates albums based on the directory
hierarchy. The effect is exactly as if the user chose "use as-is" every time in
the interactive procedure. One side effect is that "import -A" can now only take
directories, where previously it could take single items on the command line. We
need a new solution for this kind of import in the future.
2010-07-15 13:58:16 -07:00
Adrian Sampson
7816b411ad simplified interface for add_album 2010-07-14 23:04:59 -07:00
Adrian Sampson
cabf287962 autotagger now imports tracks as albums; actually gets album art 2010-07-14 22:52:13 -07:00
Adrian Sampson
6b99e3f48d importer now takes album art config options and switch
(doesn't yet actually apply art)
2010-07-14 14:58:17 -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
Adrian Sampson
ca7484e4a4 adding commands.py, which I meant to add several commits ago :( 2010-07-06 18:36:54 -07:00