Skip to content

Commit dd2b44e

Browse files
committed
minor fixes and changelog entry
1 parent c9b4e9b commit dd2b44e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

beetsplug/duplicates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ def _order(self, objs, tiebreak=None):
258258
if tiebreak and kind in tiebreak.keys():
259259
key = lambda x: tuple(getattr(x, k) for k in tiebreak[kind])
260260
else:
261-
if kind is 'items':
261+
if kind == 'items':
262262
def truthy(v):
263263
# Avoid a Unicode warning by avoiding comparison
264264
# between a bytes object and the empty Unicode
265265
# string ''.
266266
return v is not None and \
267267
(v != '' if isinstance(v, six.text_type) else True)
268-
fields = kind.all_keys()
268+
fields = Item.all_keys()
269269
key = lambda x: sum(1 for f in fields if truthy(getattr(x, f)))
270270
else:
271271
key = lambda x: len(x.items())

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Fixes:
7070
Python 3 on Windows with non-ASCII filenames. :bug:`2671`
7171
* :doc:`/plugins/absubmit`: Fix an occasional crash on Python 3 when the AB
7272
analysis tool produced non-ASCII metadata. :bug:`2673`
73+
* :doc:`/plugins/duplicates`: Use default tiebreak for any kind (item/album) that
74+
does not have a tiebreak specified in the configuration.
7375
* :doc:`/plugins/duplicates`: Fix the `--key` command line option, which was
7476
ignored.
7577
* :doc:`/plugins/replaygain`: Fix album replaygain calculation with the

0 commit comments

Comments
 (0)