progress display for non-autotagged imports

This commit is contained in:
Adrian Sampson 2010-09-28 10:29:07 -07:00
parent 7cf10d13e5
commit 4de44590d0
4 changed files with 5 additions and 3 deletions

2
NEWS
View file

@ -24,6 +24,8 @@
* The "import" command can now remove original files when it copies
items into your library. (This might be useful if you're low on disk
space.) Set the "import_delete" option in your .beetsconfig to "yes".
* Importing without autotagging ("beet import -A") now prints out album
names as it imports them to indicate progress.
* There's a new "mpdupdate" plugin that will automatically update your
MPD index whenever your beets library changes. Documentation on this
is forthcoming as well.

View file

@ -445,7 +445,7 @@ def main():
if options.verbose:
log.setLevel(logging.DEBUG)
else:
log.setLevel(logging.WARNING)
log.setLevel(logging.INFO)
# Invoke the subcommand.
try:

View file

@ -519,11 +519,12 @@ def import_files(lib, paths, copy, write, autot, logpath,
old_paths = [item.path for item in items]
for item in items:
item.move(lib, True)
lib.add_album(items)
album = lib.add_album(items)
lib.save()
if copy and delete:
for old_path in old_paths:
os.remove(old_path)
log.info('added album: %s - %s' % (album.artist, album.album))
# If we were logging, close the file.
if logfile:

View file

@ -87,4 +87,3 @@ def suite():
if __name__ == '__main__':
unittest.main(defaultTest='suite')