Skip to content

Fix/correct duplicate 'method =>' typo in liveStream GW API call#83

Open
themmm wants to merge 1 commit intophilippe44:mainfrom
themmm:fix/issue-54-livestream-method-typo
Open

Fix/correct duplicate 'method =>' typo in liveStream GW API call#83
themmm wants to merge 1 commit intophilippe44:mainfrom
themmm:fix/issue-54-livestream-method-typo

Conversation

@themmm
Copy link

@themmm themmm commented Feb 26, 2026

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 error Method unknown: method and stopped after a few seconds.

Root cause

In Custom.pm, the liveStream() function contained a duplicate method => 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 with Method unknown: method because 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

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
@themmm themmm changed the title fix: correct duplicate 'method =>' typo in liveStream GW API call Fix/correct duplicate 'method =>' typo in liveStream GW API call Feb 26, 2026
@philippe44
Copy link
Owner

Great thank you. Just one thing: don't worry adding a comment when it is just a typo.

@michaelherger
Copy link
Collaborator

Great thank you. Just one thing: don't worry adding a comment when it is just a typo.

That's the AI leaving context, isn't it? 😉

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

Successfully merging this pull request may close these issues.

Deezer Radio

3 participants