PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
798 stars 162 forks source link

models.Stream `tag_ids` is `None` for few seconds or minutes after Twitch stream starts #325

Closed ccppoo closed 2 years ago

ccppoo commented 2 years ago

If the streamer starts streaming with no tags,

Twitch adds tag based on what their language is (e.g. 'en', ) by default

Between the interval streaming starts and Twitch system adding tag automatically,

it takes few seconds or up to minutes (maximum 1 or 2).

But it is still able to call Get Streams API so Stream attribute tag_ids shows None,

but it should be empty list instead (as docs says, and it should be to work as list even when it's empty)

https://github.com/TwitchIO/TwitchIO/blob/b3b99c2f69b65deec1ff732df691d3c9e00a4f86/twitchio/models.py#L964-L976

should be like

    self.tag_ids: List[str] = data["tag_ids"] or []
github-actions[bot] commented 2 years ago

Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server

Else if you have an issue with the library please wait for someone to help you here.

IAmTomahawkx commented 2 years ago

thanks for catching this. Feel free to make a pr!