Skip to content

Conversation

@henry-oberholtzer
Copy link
Member

@henry-oberholtzer henry-oberholtzer commented Nov 23, 2025

Description

Fixes #6177, #6068.

I fixed the issue in #6177 by removing the derived class interface, and moving those fields back into function variables. They're a bit unwieldy still, but that's the algorithm it came with. There's a lot of room to continue to improve the clarity of the code in that section, but I think that'll require a deeper overhaul.

For #6068, I created the ArtistInfo and AlbumArtistInfo typed dictionaries, and was able to centralize the logic of building the artist info into build_artistinfo and build_albumartistinfo. Tests for these scenarios were created largely by expanding existing tests to incorporate the new fields.

I think I'll have to re-think the entire algorithm for 6030 to make it more flexible at parsing the issue for #6030, so I'll move that to a later PR in the interest of getting the flex attr fix in.

To Do

  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests.

@henry-oberholtzer henry-oberholtzer force-pushed the discogs-fixes branch 2 times, most recently from 91ece4c to d68514e Compare December 9, 2025 07:34
@henry-oberholtzer henry-oberholtzer changed the title Discogs: fixes for: 6177, 6068, 6030 Discogs: fixes for: 6177, 6068 Dec 9, 2025
@henry-oberholtzer henry-oberholtzer marked this pull request as ready for review December 9, 2025 07:35
@henry-oberholtzer henry-oberholtzer requested a review from a team as a code owner December 9, 2025 07:35
sourcery-ai[bot]

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 94.26752% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.70%. Comparing base (1a899cc) to head (4ac4e19).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
beetsplug/discogs.py 94.26% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6179      +/-   ##
==========================================
+ Coverage   68.68%   68.70%   +0.01%     
==========================================
  Files         138      138              
  Lines       18532    18600      +68     
  Branches     3061     3069       +8     
==========================================
+ Hits        12729    12779      +50     
- Misses       5149     5169      +20     
+ Partials      654      652       -2     
Files with missing lines Coverage Δ
beetsplug/discogs.py 74.40% <94.26%> (+3.62%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@henry-oberholtzer

This comment was marked as resolved.

@henry-oberholtzer henry-oberholtzer marked this pull request as draft December 9, 2025 17:37
@henry-oberholtzer henry-oberholtzer marked this pull request as ready for review December 10, 2025 05:21
sourcery-ai[bot]

This comment was marked as outdated.

Copy link
Contributor

@semohr semohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had some time to have a look here. Added some comments for potential improvements.

Thanks for starting to tackle the discogs plugin, it is in dire need of some love 😄

@henry-oberholtzer
Copy link
Member Author

Thanks Sebastian! I'm out of town at the moment but will get these applied once I'm back.

@semohr
Copy link
Contributor

semohr commented Dec 23, 2025

No hurry! Take your time and enjoy the holidays.

@semohr semohr self-assigned this Dec 23, 2025
@henry-oberholtzer henry-oberholtzer added this to the 2.6.0 milestone Dec 30, 2025
@henry-oberholtzer henry-oberholtzer linked an issue Dec 31, 2025 that may be closed by this pull request
index = 0
divisions: list[str] = []
next_divisions: list[str] = []
t: TracklistInfo = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try to not use single character variable names? I get that they simplify things in writing but my fish brain forgets what t is after reading like 20 lines 🤣

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - they're fine for hashing out the ideas but they do make retreading the code a lot harder.

Copy link
Contributor

@semohr semohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should good here!

While the whole logic is still a bit convoluted, I feel like it is a major improvement from before the PR 👍

Thank you for taking the initiative!

@snejus snejus self-assigned this Jan 6, 2026
@henry-oberholtzer
Copy link
Member Author

Updated the variable name - can go ahead and merge if all looks good!

@semohr
Copy link
Contributor

semohr commented Jan 7, 2026

I think @snejus wants to have a look too since he self assigned this to himself too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected flex attr saved by Discogs plugin: medium_str discogs: add support for multi value fields

4 participants