Skip to content

Commit

Permalink
Correctly display track number 0 in show_change
Browse files Browse the repository at this point in the history
fixes issue beetbox#3346: For (hidden) tracks with index 0, the UI would
previously show a #0 -> beetbox#1 change when actually the index would be set to 0.
Now, properly distinguish index 0 and None (i.e. not set)
  • Loading branch information
wisp3rwind committed Aug 19, 2019
1 parent 27e0e76 commit fd01ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beets/ui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def format_index(track_info):
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)

Expand Down

0 comments on commit fd01ad5

Please sign in to comment.