Fix/correct duplicate 'method =>' typo in liveStream GW API call#83
Open
themmm wants to merge 1 commit intophilippe44:mainfrom
Open
Fix/correct duplicate 'method =>' typo in liveStream GW API call#83themmm wants to merge 1 commit intophilippe44:mainfrom
themmm wants to merge 1 commit intophilippe44:mainfrom
Conversation
In Perl, `method => method => 'livestream.getData'` is parsed as the
3-element list ('method', 'method', 'livestream.getData'). When used as
a hash, this yields { method => 'method', 'livestream.getData' => undef },
so the GW API was being invoked with the method name "method" instead of
"livestream.getData". Deezer responded with "Method unknown: method",
which caused radio playback to fail immediately.
Fix: remove the duplicate `method =>` so the hash correctly contains
{ method => 'livestream.getData' }.
Fixes: philippe44#54
Owner
|
Great thank you. Just one thing: don't worry adding a comment when it is just a typo. |
Collaborator
That's the AI leaving context, isn't it? 😉 |
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.
Disclaimer:
All code-changes have been made with Claude-code.
Fix: Deezer Radio always failing with "Method unknown: method"
Deezer Radio / livestream playback has never worked due to a one-word typo in the GW API call inside
liveStream(). Every attempt to play a radio station produced the errorMethod unknown: methodand stopped after a few seconds.Root cause
In
Custom.pm, theliveStream()function contained a duplicatemethod =>fat-comma expression. In Perl, the fat-comma operator=>auto-quotes its left operand (a bareword), so the duplicate produced a 3-element list instead of a key-value pair. The resulting hash contained the method name"method"instead of"livestream.getData". Deezer responded withMethod unknown: methodbecause no API method by that name exists.Fix
Remove the duplicate
method =>so the GW API is called with the correct method name"livestream.getData".Verified working: radio stations now resolve to a real stream URL and play correctly.
Fixes #54