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

Bug in new UI when multiple mediums are in one release #4947

Closed
JOJ0 opened this issue Oct 12, 2023 · 8 comments
Closed

Bug in new UI when multiple mediums are in one release #4947

JOJ0 opened this issue Oct 12, 2023 · 8 comments

Comments

@JOJ0
Copy link
Member

JOJ0 commented Oct 12, 2023

Possible bug in this function when multiple mediums are in one release: https://github.com/beetbox/beets/pull/3721/files#r1328227367

Update: I copied over @RollingStar 's initial report of this issue as it was here: #3721 (comment)

Orignal report

Possible bug in mixed-medium releases (ex. 1 CD and 1 vinyl record)

https://github.com/beetbox/beets/pull/3721/files#r1328227367

Most logical fix might be "2xMedia" or "2xMixed". Keeping the new UI short horizontally is a goal.

https://musicbrainz.org/release/581db767-5221-424b-b6a0-d5db2ff707a1

image

@RollingStar
Copy link
Collaborator

#3721 (comment)

@InvisibleFunction
Copy link
Contributor

I think I'm also running into this issue trying to import Hybrid SACDs.

Examples here: #4976

@JOJ0
Copy link
Member Author

JOJ0 commented Oct 28, 2023

Possible bug in this function when multiple mediums are in one release: https://github.com/beetbox/beets/pull/3721/files#r1328227367

The lines of code referenced, here in detail and In their current state, as of writing:

beets/beets/ui/commands.py

Lines 450 to 461 in f984749

def make_medium_info_line(self, track_info):
"""Construct a line with the current medium's info."""
media = self.match.info.media or "Media"
# Build output string.
if self.match.info.mediums > 1 and track_info.disctitle:
return f"* {media} {track_info.medium}: {track_info.disctitle}"
elif self.match.info.mediums > 1:
return f"* {media} {track_info.medium}"
elif track_info.disctitle:
return f"* {media}: {track_info.disctitle}"
else:
return ""

which brings me to the conclusion: This is not the function where the line in the screenshot above is produced.

The thing in the screenshot comes from the disambig_string() which is this one:

beets/beets/ui/commands.py

Lines 198 to 210 in f984749

def disambig_string(info):
"""Generate a string for an AlbumInfo or TrackInfo object that
provides context that helps disambiguate similar-looking albums and
tracks.
"""
if isinstance(info, hooks.AlbumInfo):
disambig = get_album_disambig_fields(info)
elif isinstance(info, hooks.TrackInfo):
disambig = get_singleton_disambig_fields(info)
else:
return ""
return ", ".join(disambig)

I guess that was just a quick analysis back then without double checking everything from @RollingStar (our main-topic had more priority than finding the root cause of this issue here), I just wanted to clarify and make sure we are all on the same page. Now let's work from here :-)

@JOJ0
Copy link
Member Author

JOJ0 commented Oct 28, 2023

I think I'm also running into this issue trying to import Hybrid SACDs.

Examples here: #4976

I've not entirely made it through your report over there. Just want to mention that up to now I was assuming that this exact issue here, is only cosmetical and has nothing to do with the matching process per-se.

I could be wrong but please double check my assumption! :-)

@RollingStar
Copy link
Collaborator

Sorry I had the wrong function listed. I didn't debug the function so it was just a guess based on some searches.

@JOJ0
Copy link
Member Author

JOJ0 commented Oct 29, 2023

No worries at all! I learned something new. The function you mentioned is in fact the one that does the headlines like for example

* CD1

:-)

@InvisibleFunction
Copy link
Contributor

Is the issue here?

first_medium = release["medium-list"][0]

It looks like it just grabs the format of the first medium and uses that for everything.

@InvisibleFunction
Copy link
Contributor

I think this is closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants