mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 21:12:43 +01:00
Default to match on mb_{track,album}id
This commit is contained in:
parent
35e727b86f
commit
587de12ecc
2 changed files with 10 additions and 10 deletions
|
|
@ -17,7 +17,7 @@
|
|||
import logging
|
||||
|
||||
from beets.plugins import BeetsPlugin
|
||||
from beets.ui import decargs, print_obj, Subcommand
|
||||
from beets.ui import decargs, print_obj, vararg_callback, Subcommand
|
||||
|
||||
PLUGIN = 'duplicates'
|
||||
log = logging.getLogger('beets')
|
||||
|
|
@ -35,7 +35,7 @@ def _group_by(objs, keys):
|
|||
return counts
|
||||
|
||||
|
||||
def _duplicates(objs, keys=['mb_trackid'], full=0):
|
||||
def _duplicates(objs, keys, full):
|
||||
"""Generate triples of MBIDs, duplicate counts, and constituent
|
||||
objects.
|
||||
"""
|
||||
|
|
@ -55,7 +55,7 @@ class DuplicatesPlugin(BeetsPlugin):
|
|||
self.config.add({'count': False})
|
||||
self.config.add({'album': False})
|
||||
self.config.add({'full': False})
|
||||
self.config.add({'keys': ['mb_trackid']})
|
||||
self.config.add({'keys': ['mb_trackid', 'mb_albumid']})
|
||||
|
||||
self._command = Subcommand('duplicates',
|
||||
help=__doc__,
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ config file::
|
|||
album: no
|
||||
full: no
|
||||
keys:
|
||||
- mb_trackid
|
||||
- album
|
||||
- mb_trackid
|
||||
- album
|
||||
|
||||
or on the command-line::
|
||||
|
||||
|
|
@ -82,9 +82,9 @@ keys
|
|||
|
||||
The ``keys`` option (default: ``mb_trackid``) defines in which track
|
||||
or album fields duplicates are to be searched. By default, the plugin
|
||||
only uses the musicbrainz track or album ID for this purpose. Using the
|
||||
``keys`` option (as a YAML list in the configuration file, or a
|
||||
comma-delimited string in the command-line), you can extend this behavior
|
||||
uses the musicbrainz track and album IDs for this purpose. Using the
|
||||
``keys`` option (as a YAML list in the configuration file, or as
|
||||
space-delimited strings in the command-line), you can extend this behavior
|
||||
to consider other attributes.
|
||||
|
||||
|
||||
|
|
@ -113,9 +113,9 @@ The same as the above but include the original album, and show the path::
|
|||
beet duplicates -acf '$path'
|
||||
|
||||
|
||||
Get rid of false positives arising from the same track existing in different albums::
|
||||
Get tracks with the same title, artist, and album::
|
||||
|
||||
beet duplicates -k mb_trackid,album
|
||||
beet duplicates -k title albumartist album
|
||||
|
||||
TODO
|
||||
----
|
||||
|
|
|
|||
Loading…
Reference in a new issue