wtwitch
wtwitch copied to clipboard
[BUG] New Subscription puts "null" in config
Describe the bug
I can't subscribe to a new twitch. I get Live channels:jq: error (at <stdin>:1): Cannot iterate over null (null)
when I run wtwitch c
To Reproduce
I ran wtwitch s pge4
then the end of my config was read "lastSubscriptionUpdate": "null"
Then I remove the new subscription from my config and it works as expected.
Expected behavior I want to be able to subscribe to a channel and not have an error.
Logs/system info (please complete the following information):
- Artix Linux Open RC 6.7.9-zen1-1-zen
- wtwitch 2.6.3-1
lastSubscriptionUpdate
being set to "null" when subscribing or unsubscribing is the usual behavior. That's not the source of your issue.
The issue is that before adding this new channel you are subscribed to exactly 100 channels. Afterwards it's 101, which exceeds the Twitch API's maximum number of URLs to return per page. Twitch likely only returns an error response instead of the stream data.
There's a pull request https://github.com/krathalan/wtwitch/pull/31 to paginate the API calls, but until then you will be limited to 100 subscriptions.