From 0bc3727fcf339c5f42204b8d229b0a83c25e7918 Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Mon, 19 Aug 2019 23:23:00 +0200 Subject: [PATCH] Correctly display track number 0 in show_change fixes issue #3346: When the per_disc_numbering option was set, the UI would previously show a #0 -> #1 change when actually the index would be set to 0 (a valid index, such as for hidden tracks). Now, properly distinguish index 0 and None (i.e. not set) --- beets/ui/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 53253c1da..57b627c77 100755 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -241,7 +241,8 @@ def show_change(cur_artist, cur_album, match): if mediums and mediums > 1: return u'{0}-{1}'.format(medium, medium_index) else: - return six.text_type(medium_index or index) + return six.text_type(medium_index if medium_index is not None + else index) else: return six.text_type(index)