Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream lists are empty #706

Closed
2 tasks done
alsadata opened this issue Feb 21, 2020 · 8 comments
Closed
2 tasks done

Stream lists are empty #706

alsadata opened this issue Feb 21, 2020 · 8 comments

Comments

@alsadata
Copy link

alsadata commented Feb 21, 2020

Bug report

  • I understand the difference between Streamlink and Streamlink Twitch GUI.
  • This is a bug report and I have read the contribution guidelines.

Environment details

Operating system and version:
Windows 10

Streamlink Twitch GUI version:
1.9.1
NW.js: 0.42.3
Architecture: x64

Streamlink version:
streamlink 1.3.1

Configuration details:
I just upgraded from 1.9.0 to 1.9.1 to see if the error was fixed but the error occures in both versions

Description

When I open Streams in the left menu, all I get is:

Top Streams

The returned list of top streams is empty.

When I open Games, I can see the list of all games being streamed.
However, if I open any of them, I get the same result:

Dota 2

The returned list of streams of this game is empty.

Any stream under Featured works correctly.

Two days ago, everything worked smoothly with the previous versions Streamlink Twitch GUI 1.9.0 and Streamlink 1.3.0 so I suspect it's an API change from Twitch.

Expected / Actual behavior

I expect to see all streams under Streams and all related streams when selecting a game under Games

See description above for actual behaviour.

Reproduction steps

  1. Open Streamlink Twitch GUI
  2. Click Straems in the left menubar under Browse
  3. See empty list

Log output

[2020-02-21T20:37:46.752Z][debug][Application]
Parameters
{
    "_": [],
    "tray": false,
    "hide": false,
    "hidden": false,
    "max": false,
    "maximize": false,
    "maximized": false,
    "min": false,
    "minimize": false,
    "minimized": false,
    "reset-window": false,
    "versioncheck": true,
    "version-check": true,
    "logfile": true,
    "loglevel": "debug",
    "l": "debug",
    "launch": "",
    "goto": ""
}

Additional comments, screenshots, etc.

@bastimeyer
Copy link
Member

That issue is caused by an API change on Twitch's end.

It's probably related to https://discuss.dev.twitch.tv/t/upcoming-changes-to-the-streams-v5-endpoints/23926 where they made some changes to all streams related API endpoints. The changes mentioned there however shouldn't affect Streamlink Twitch GUI, since it already has a workaround implemented for this property which got removed now, as it was inconsistent.

The issue with the empty API responses seems to be caused by the language filter. Filtering streams by language works by adding the broadcaster_language parameter to streams API requests. This is now broken and an empty list is returned if this parameter holds two values (separated with a comma). This means that you can't filter for multiple languages anymore.

No broadcaster_language set:

$ curl -s \
  -H "Accept: application/vnd.twitchtv.v5+json" \
  -H "Client-ID: phiay4sq36lfv9zu7cbqwz2ndnesfd8" \
  "https://api.twitch.tv/kraken/streams?limit=3" \
  | jq "[.streams[] | .channel.name]"
[
  "lec",
  "rubius",
  "rocketleague"
]

One broadcaster_language set (de - German):

$ curl -s \
  -H "Accept: application/vnd.twitchtv.v5+json" \
  -H "Client-ID: phiay4sq36lfv9zu7cbqwz2ndnesfd8" \
  "https://api.twitch.tv/kraken/streams?limit=3&broadcaster_language=de" \
  | jq "[.streams[] | .channel.name]"
[
  "montanablack88",
  "gronkh",
  "summonersinnlive"
]

Multiple broadcaster_language set: (en,de - English and German):

$ curl -s \
  -H "Accept: application/vnd.twitchtv.v5+json" \
  -H "Client-ID: phiay4sq36lfv9zu7cbqwz2ndnesfd8" \
  "https://api.twitch.tv/kraken/streams?limit=3&broadcaster_language=en,de" \
  | jq "[.streams[] | .channel.name]"
[]

Let me open a new thread on the Twitch dev forums... I can already tell you though what answer we'll get:
"It's not supported, because it's not documented".

Btw, if you read the linked post from the Twitch devs, you'll see that they are once again crippling the kraken API (with a ridiculous time frame for developers - without properly notifying them), because they want developers to switch over to the helix API. The helix API however is still, after more than two years of development, very much limited in terms of features.

@fgl27
Copy link

fgl27 commented Feb 21, 2020

have you read?
https://dev.twitch.tv/docs/v5/reference/streams

languages -> Constrains the language of the streams returned. Valid value: a locale ID string; for example, en, fi, es-mx. Only one language can be specified. Default: all languages.

I don't use broadcaster_language but just language, and it was working for multiple languages until yesterday.

also some languages don't work anymore as "es-mx" or "pt-br", didn't try those with broadcaster_language yet maybe works maybe not.

btw 900 max what a joke...

@bastimeyer
Copy link
Member

Yes, I have read the documentation. 😪

There is a distinction between the language and broadcaster_language properties. language refers to a channel's own language settings, whereas broadcaster_language is used to describe the stream's language. A channel can be streaming while having two different values here. When filtering for languages in stream lists, the only thing that's important is the broadcaster_language, not the language setting a channel has chosen for themselves.

The comma-separated parameter was used by Twitch on their website before they switched over to the GQL API. It was actually even supported by the API before their website was using it. You can look up the related issues on this issue tracker here. It was partly broken and got re-implemented twice if I remember correctly.

@bastimeyer
Copy link
Member

The language request parameter seems to be completely broken. No matter which value is set, it's returning an unfiltered list. That's a proper reason for opening an issue on the dev forums. I'll link it here once I've posted it. I'll try a couple of other things first though.

@fgl27
Copy link

fgl27 commented Feb 21, 2020

Yes I was just testing and notice it, broadcaster_language is fine, language works for the clip api but when enable it becomes really slow to answer, broadcaster_language never worked there...

Seems that they are disabling/limiting server resources for those old api.

@bastimeyer
Copy link
Member

bastimeyer commented Feb 21, 2020

Issue reported on the Twitch dev forums:
https://discuss.dev.twitch.tv/t/kraken-language-and-broadcaster-language-request-parameters-partly-broken/24214

@alsadata
Copy link
Author

You were right, I had the streams filtered to Danish and English.

By going to Settings -> Languages, clicking Uncheck all and saving the settings, the stream lists worked again (For anyone else stumbling over this issue :-) )

@alkim0
Copy link

alkim0 commented Apr 14, 2020

Note that the language parameter now works according to twitchdev/issues#66. However, the broadcaster_language still seems broken. It seems it would be prudent to change language filtering settings from broadcaster_language to language.

bastimeyer added a commit that referenced this issue May 17, 2020
#706, 1c59156

Don't default to "fade out" when translating old settings format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants