Skip to content

Commit d91960a

Browse files
committed
minor comment/doc tweaks for #690
The description of the import command was getting a bit unwieldy. Splitting up the paragraph helped a little, but the docs could still use some love here.
1 parent 38c2b9a commit d91960a

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

beets/importer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,12 +652,12 @@ def read_tasks(session):
652652
history_dirs = history_get()
653653

654654
for toppath in session.paths:
655-
# Extract archives
655+
# Extract archives.
656656
archive_task = None
657657
if ArchiveImportTask.is_archive(syspath(toppath)):
658658
if not (config['import']['move'] or config['import']['copy']):
659-
log.warn("Cannot import archive. Please set "
660-
"the 'move' or 'copy' option.")
659+
log.warn("Archive importing requires either "
660+
"'copy' or 'move' to be enabled.")
661661
continue
662662

663663
log.debug('extracting archive {0}'
@@ -668,6 +668,8 @@ def read_tasks(session):
668668
except Exception as exc:
669669
log.error('extraction failed: {0}'.format(exc))
670670
continue
671+
672+
# Continue reading albums from the extracted directory.
671673
toppath = archive_task.toppath
672674

673675
# Check whether the path is to a file.
@@ -724,7 +726,7 @@ def read_tasks(session):
724726
yield ImportTask(toppath, paths, items)
725727

726728
# Indicate the directory is finished.
727-
# FIXME hack to delete extraced archives
729+
# FIXME hack to delete extracted archives
728730
if archive_task is None:
729731
yield ImportTask.done_sentinel(toppath)
730732
else:

docs/reference/cli.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,22 @@ import
4949
Add music to your library, attempting to get correct tags for it from
5050
MusicBrainz.
5151

52-
Point the command at a directory full of music. The directory can be a
53-
single album or a directory whose leaf subdirectories are albums (the
54-
latter case is true of typical Artist/Album organizations and many
55-
people's "downloads" folders). The path can also be a single file or an
56-
archive. Beets supports `zip` and `tar` archives out of the box. To
57-
extract `rar` files you need to install the `rarfile`_ package and the
58-
`unrar` command. The music will be copied to a configurable directory
59-
structure (see below) and added to a library database (see below). The
60-
command is interactive and will try to get you to verify MusicBrainz
61-
tags that it thinks are suspect. (This means that importing a large
62-
amount of music is therefore very tedious right now; this is something
63-
we need to work on. Read the :doc:`autotagging guide </guides/tagger>`
64-
if you need help.)
52+
Point the command at some music: directories, single files, or
53+
compressed archives. The music will be copied to a configurable
54+
directory structure and added to a library database. The command is
55+
interactive and will try to get you to verify MusicBrainz tags that it
56+
thinks are suspect. See the :doc:`autotagging guide </guides/tagger>`
57+
for detail on how to use the interactive tag-correction flow.
58+
59+
Directories passed to the import command can contain either a single
60+
album or many, in which case the leaf directories will be considered
61+
albums (the latter case is true of typical Artist/Album organizations
62+
and many people's "downloads" folders). The path can also be a single
63+
song or an archive. Beets supports `zip` and `tar` archives out of the
64+
box. To extract `rar` files, install the `rarfile`_ package and the
65+
`unrar` command.
66+
67+
Optional command flags:
6568

6669
* By default, the command copies files your the library directory and
6770
updates the ID3 tags on your music. If you'd like to leave your music

0 commit comments

Comments
 (0)