fix(Deezer): Treat record_type as lowercase#194
Merged
kellnerd merged 1 commit intokellnerd:mainfrom Mar 13, 2026
Merged
Conversation
kellnerd
requested changes
Mar 12, 2026
Owner
There was a problem hiding this comment.
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.
2b937f7 to
72c2983
Compare
kellnerd
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deezer returns the
record_typevalue in lowercase, while the code for handling thecompiletype was expecting it to be returned in uppercase. Fixes #184: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