mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 05:34:47 +01:00
underscore_naming in play (#708)
This commit is contained in:
parent
e8f56c897b
commit
d96d12440e
1 changed files with 6 additions and 6 deletions
|
|
@ -51,24 +51,24 @@ def play_music(lib, opts, args):
|
|||
|
||||
for album in albums:
|
||||
paths.append(album.item_dir())
|
||||
itemType = 'album'
|
||||
item_type = 'album'
|
||||
|
||||
# Preform item query and add tracks to playlist.
|
||||
else:
|
||||
paths = [item.path for item in lib.items(ui.decargs(args))]
|
||||
itemType = 'track'
|
||||
item_type = 'track'
|
||||
|
||||
itemType += 's' if len(paths) > 1 else ''
|
||||
item_type += 's' if len(paths) > 1 else ''
|
||||
|
||||
if not paths:
|
||||
ui.print_(ui.colorize('yellow', 'No {0} to play.'.format(itemType)))
|
||||
ui.print_(ui.colorize('yellow', 'No {0} to play.'.format(item_type)))
|
||||
return
|
||||
|
||||
# Warn user before playing any huge playlists.
|
||||
if len(paths) > 100:
|
||||
ui.print_(ui.colorize(
|
||||
'yellow',
|
||||
'You are about to queue {0} {1}.'.format(len(paths), itemType)))
|
||||
'You are about to queue {0} {1}.'.format(len(paths), item_type)))
|
||||
|
||||
if ui.input_options(('Continue', 'Abort')) == 'a':
|
||||
return
|
||||
|
|
@ -84,7 +84,7 @@ def play_music(lib, opts, args):
|
|||
if output:
|
||||
log.debug(u'Output of {0}: {1}'.format(command, output))
|
||||
|
||||
ui.print_(u'Playing {0} {1}.'.format(len(paths), itemType))
|
||||
ui.print_(u'Playing {0} {1}.'.format(len(paths), item_type))
|
||||
|
||||
|
||||
class PlayPlugin(BeetsPlugin):
|
||||
|
|
|
|||
Loading…
Reference in a new issue