Skip to content

Commit

Permalink
Merge pull request #3347 from wisp3rwind/pr-fix-track-number-0
Browse files Browse the repository at this point in the history
Correctly display track number 0 in show_change
  • Loading branch information
wisp3rwind authored Aug 20, 2019
2 parents 27e0e76 + 29d6967 commit 96d61b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beets/ui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ 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
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ Fixes:
returned by Spotify Albums API.
Thanks to :user:`rhlahuja`.
:bug:`3343`
* Fixed a bug that caused the UI to display incorrect track numbers for tracks
with index 0 when the ``per_disc_numbering`` option was set.
:bug:`3346`

For plugin developers:

Expand Down

0 comments on commit 96d61b8

Please sign in to comment.