This plugin adds a new command, duplicates or dup, which finds and lists duplicate tracks or albums in your collection.
To use the duplicates plugin, first enable it in your configuration (see Using Plugins).
By default, the beet duplicates command lists the names of tracks in your library that are duplicates. It assumes that Musicbrainz track and album ids are unique to each track or album. That is, it lists every track or album with an ID that has been seen before in the library. You can customize the output format, count the number of duplicate tracks or albums, and list all tracks that have duplicates or just the duplicates themselves via command-line switches
-h, --help show this help message and exit
-f FMT, --format=FMT print with custom format
-a, --album show duplicate albums instead of tracks
-c, --count count duplicate tracks or albums
-C PROG, --checksum=PROG
report duplicates based on arbitrary command
-d, --delete delete items from library and disk
-F, --full show all versions of duplicate tracks or albums
-s, --strict report duplicates only if all attributes are set
-k, --keys report duplicates based on keys
-m DEST, --move=DEST move items to dest
-o DEST, --copy=DEST copy items to dest
-p, --path print paths for matched items or albums
-t TAG, --tag=TAG tag matched items with 'k=v' attribute
To configure the plugin, make a duplicates: section in your configuration file. The available options mirror the command-line options:
List all duplicate tracks in your collection:
beet duplicates
List all duplicate tracks from 2008:
beet duplicates year:2008
Print out a unicode histogram of duplicate track years using spark:
beet duplicates -f '$year' | spark
▆▁▆█▄▇▇▄▇▇▁█▇▆▇▂▄█▁██▂█▁▁██▁█▂▇▆▂▇█▇▇█▆▆▇█▇█▇▆██▂▇
Print out a listing of all albums with duplicate tracks, and respective counts:
beet duplicates -ac
The same as the above but include the original album, and show the path:
beet duplicates -acf '$path'
Get tracks with the same title, artist, and album:
beet duplicates -k title albumartist album
Compute Adler CRC32 or MD5 checksums, storing them as flexattrs, and report back duplicates based on those values:
beet dup -C 'ffmpeg -i {file} -f crc -'
beet dup -C 'md5sum {file}'
Copy highly danceable items to party directory:
beet dup --copy /tmp/party
Move likely duplicates to trash directory:
beet dup --move ${HOME}/.Trash
Delete items (careful!), if they’re Nickelback:
beet duplicates --delete --keys albumartist albumartist:nickelback
Tag duplicate items with some flag:
beet duplicates --tag dup=1
Ignore items with undefined keys:
beet duplicates --strict