mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 09:33:46 +01:00
Add --path sugar
This commit is contained in:
parent
0eb70ebfa5
commit
35e727b86f
1 changed files with 10 additions and 1 deletions
|
|
@ -81,12 +81,18 @@ class DuplicatesPlugin(BeetsPlugin):
|
|||
help='show all versions of duplicate\
|
||||
tracks or albums')
|
||||
|
||||
self._command.parser.add_option('-p', '--path', dest='path',
|
||||
action='store_true',
|
||||
help='print paths for matched items\
|
||||
or albums')
|
||||
|
||||
self._command.parser.add_option('-k', '--keys', dest='keys',
|
||||
action='callback',
|
||||
callback=vararg_callback,
|
||||
help='report duplicates based on keys')
|
||||
|
||||
def commands(self):
|
||||
def _dup(lib, opts, args):
|
||||
opts.keys = opts.keys.split(',')
|
||||
self.config.set_args(opts)
|
||||
fmt = self.config['format'].get()
|
||||
count = self.config['count'].get()
|
||||
|
|
@ -99,6 +105,9 @@ class DuplicatesPlugin(BeetsPlugin):
|
|||
else:
|
||||
items = lib.items(decargs(args))
|
||||
|
||||
if opts.path:
|
||||
fmt = '$path'
|
||||
|
||||
# Default format string for count mode.
|
||||
if count and not fmt:
|
||||
if album:
|
||||
|
|
|
|||
Loading…
Reference in a new issue