import.detail config option (GC-263)

This commit is contained in:
Adrian Sampson 2013-02-26 20:36:29 -08:00
parent 6ab9b55845
commit 706c4fb7f6
4 changed files with 18 additions and 1 deletions

View file

@ -17,6 +17,7 @@ import:
singletons: no
default_action: apply
languages: []
detail: no
clutter: ["Thumbs.DB", ".DS_Store"]
ignore: [".*", "*~", "System Volume Information"]

View file

@ -226,13 +226,17 @@ def show_change(cur_artist, cur_album, match):
if lhs != rhs:
lines.append((lhs, rhs, lhs_width))
elif config['import']['detail']:
lines.append((lhs, '', lhs_width))
# Print each track in two columns, or across two lines.
col_width = (ui.term_width() - len(''.join([' * ', ' -> ']))) // 2
if lines:
max_width = max(w for _, _, w in lines)
for lhs, rhs, lhs_width in lines:
if max_width > col_width:
if not rhs:
print_(u' * {0}'.format(lhs))
elif max_width > col_width:
print_(u' * %s ->\n %s' % (lhs, rhs))
else:
pad = max_width - lhs_width

View file

@ -10,6 +10,8 @@ New configuration options:
from MusicBrainz. This feature requires `python-musicbrainz-ngs`_ 0.3 or
later, which (at the time of this writing) is not yet released. Thanks to
Sam Doshi.
* :ref:`detail` enables a mode where all tracks are listed in the importer UI,
as opposed to only changed tracks.
Other stuff:

View file

@ -327,6 +327,16 @@ this to "en" uses the transliterated artist name "Pyotr Ilyich Tchaikovsky"
instead of the Cyrillic script for the composer's name when tagging from
MusicBrainz. Defaults to an empty list, meaning that no language is preferred.
.. _detail:
detail
~~~~~~
Whether the importer UI should show detailed information about each match it
finds. When enabled, this mode prints out the title of every track, regardless
of whether it matches the original metadata. (The default behavior only shows
changes.) Default: ``no``.
.. _musicbrainz-config:
MusicBrainz Options