mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 17:16:07 +01:00
add "album art" to info plugin
This commit is contained in:
parent
160b373705
commit
61a037af6f
1 changed files with 9 additions and 1 deletions
|
|
@ -27,7 +27,10 @@ def info(paths):
|
|||
for name, _, _, mffield in library.ITEM_FIELDS:
|
||||
if mffield:
|
||||
fields.append(name)
|
||||
maxwidth = max(len(name) for name in fields)
|
||||
|
||||
# Line format.
|
||||
other_fields = ['album art']
|
||||
maxwidth = max(len(name) for name in fields + other_fields)
|
||||
lineformat = u'{{:>{0}}}: {{}}'.format(maxwidth)
|
||||
|
||||
first = True
|
||||
|
|
@ -42,8 +45,13 @@ def info(paths):
|
|||
except mediafile.UnreadableFileError:
|
||||
ui.print_('cannot read file')
|
||||
continue
|
||||
|
||||
# Basic fields.
|
||||
for name in fields:
|
||||
ui.print_(lineformat.format(name, getattr(mf, name)))
|
||||
# Extra stuff.
|
||||
ui.print_(lineformat.format('album art', mf.art is not None))
|
||||
|
||||
|
||||
first = False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue