Skip to content

fix(Deezer): Treat record_type as lowercase#194

Merged
kellnerd merged 1 commit intokellnerd:mainfrom
nyakase:fix/deezer-record_type
Mar 13, 2026
Merged

fix(Deezer): Treat record_type as lowercase#194
kellnerd merged 1 commit intokellnerd:mainfrom
nyakase:fix/deezer-record_type

Conversation

@nyakase
Copy link
Contributor

@nyakase nyakase commented Mar 12, 2026

Deezer returns the record_type value in lowercase, while the code for handling the compile type was expecting it to be returned in uppercase. Fixes #184:

image

I'm not sure why the code was expecting uppercase though. I'm not familiar with the Deezer API and couldn't find documentation for it, but resorting to GitHub search as "documentation" I did find an older deezer-python test where they were already lowercase: https://github.com/browniebroke/deezer-python/blob/92556aef6b948e10447c143bc6062c916babd18e/tests/cassettes/TestClient.test_get_albums_chart.yaml

@kellnerd kellnerd added bug Something isn't working Deezer labels Mar 12, 2026
Copy link
Owner

@kellnerd kellnerd left a comment

Choose a reason for hiding this comment

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

Thank you for addressing this. I wasn't aware that this is just a capitalization issue.

I'm not sure why the code was expecting uppercase though.

I think Deezer might have changed the capitalization at some point (or is very inconsistent with it). At least in November 2024 there surely was a case where the value was COMPILE, otherwise I wouldn't have fixed it that way back then. Unfortunately there were no lookup test cases back then, the one from 2025 already uses single in lower case.

Can you please convert sourceType to lower case to handle both cases?

Deezer is seemingly inconsistent about the record_type value being uppercase
or lowercase. The code for handling the "compile" type would only work if it
was returned as "COMPILE". Forcing a casing makes it work in both scenarios.
@nyakase nyakase force-pushed the fix/deezer-record_type branch from 2b937f7 to 72c2983 Compare March 12, 2026 23:17
@nyakase nyakase requested a review from kellnerd March 13, 2026 00:15
@kellnerd kellnerd merged commit 72c2983 into kellnerd:main Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Deezer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deezer may return non-standard release type

2 participants