Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importer displays misleading info on album with track 0 #3346

Closed
IgniFerroque opened this issue Aug 17, 2019 · 3 comments

Comments

@IgniFerroque
Copy link

commented Aug 17, 2019

On importing this album:

https://musicbrainz.org/release/bbf6ecfb-cb4f-401c-9d05-2b6c22d1366d

I get this:

Tagging:
    Guster - Goldfly
URL:
    https://musicbrainz.org/release/bbf6ecfb-cb4f-401c-9d05-2b6c22d1366d
(Similarity: 100.0%) (CD, 1997, US, Aware Records, AWA 107)
 * Melanie (#0) -> Melanie (#1)

Which suggests that that track will be tagged as track 1, but in fact it is correctly imported as track 0. I would expect the import to show no changes.

@sampsyo sampsyo added the bug label Aug 17, 2019

@wisp3rwind

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

Do you enable the per_disc_numbering option in your configuration? If yes, the following change in ui/commands.py might be enough to fix the problem:

diff --git a/beets/ui/commands.py b/beets/ui/commands.py
index 53253c1d..5ad264a8 100755
--- a/beets/ui/commands.py
+++ b/beets/ui/commands.py
@@ -241,7 +241,7 @@ 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)
@IgniFerroque

This comment has been minimized.

Copy link
Author

commented Aug 19, 2019

I did enable that option:

my config:

directory: /Volumes/Music/BeetsMusic
library: /Volumes/Music/beetsMusic.db
import:
    move: no
per_disc_numbering: yes
paths:
    default: $albumartist/$album%aunique{}/%if{$multidisc,$disc-}$track $title
plugins: fetchart```
wisp3rwind added a commit to wisp3rwind/beets that referenced this issue Aug 19, 2019
Correctly display track number 0 in show_change
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)
wisp3rwind added a commit to wisp3rwind/beets that referenced this issue Aug 19, 2019
Correctly display track number 0 in show_change
fixes issue beetbox#3346: When the per_disc_numbering option was set, the UI would
previously show a #0 -> beetbox#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)
wisp3rwind added a commit to wisp3rwind/beets that referenced this issue Aug 19, 2019
Correctly display track number 0 in show_change
fixes issue beetbox#3346: When the per_disc_numbering option was set, the UI would
previously show a #0 -> beetbox#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)
@wisp3rwind

This comment has been minimized.

Copy link
Member

commented Aug 20, 2019

Should be fixed on master now, if it isn't, please reopen this issue. Thanks for the report!

@wisp3rwind wisp3rwind closed this Aug 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.