Skip to content

Commit

Permalink
Avoid a crash when mediums is none
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Apr 29, 2018
1 parent 4288e11 commit e8190b5
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 @@ -237,7 +237,7 @@ def format_index(track_info):
medium = track_info.disc
mediums = track_info.disctotal
if config['per_disc_numbering']:
if mediums > 1:
if mediums and mediums > 1:
return u'{0}-{1}'.format(medium, medium_index)
else:
return six.text_type(medium_index or index)
Expand Down

0 comments on commit e8190b5

Please sign in to comment.