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

Twitch helix API #849

Closed
bastimeyer opened this issue Jan 1, 2022 · 9 comments · Fixed by #852
Closed

Twitch helix API #849

bastimeyer opened this issue Jan 1, 2022 · 9 comments · Fixed by #852

Comments

@bastimeyer
Copy link
Member

bastimeyer commented Jan 1, 2022

2022 is here and Twitch's kraken v5 API will finally be shut down at the end of February. The switch towards the helix API hasn't been done yet here, which is mainly due to helix not being that great and due to the extension of kraken's lifespan when the shutdown was first announced in 2018. I've been procrastinating the transition in the past couple of months, and the reason for that is that there will be some changes which I'm not happy about and I didn't want to publish a release with these changes sooner than necessary.

There's already the existing thread #599 for the API switch which was made in 2018, but let's close this one and create a new one.

As said, I've been a bit lazy with the API changes, and that's because the switch to helix will introduce some more limitations for Streamlink Twitch GUI. Twitch has already removed lots of stuff from their kraken API last year and hasn't added missing features to helix which they've promised multiple times in the past years. The whole story is rather long and doesn't have to be described in detail in this thread.

The biggest limitation will probably be the authentication, which will now be mandatory for all API requests, so third party applications like this won't be able to retrieve data without user logins anymore. There's also no 1:1 mapping for all API endpoints, so this will result in some feature removals. The stuff is documented on the following site, but that doesn't include everything.
https://dev.twitch.tv/docs/api/migration

I will be focusing on implementing helix this month, so a new major release of Streamlink Twitch GUI can be published with all the necessary changes before the kraken API will be shut down. According to Twitch, they will test the kraken API shutdown sporadically in February, but I hope that I'll have completed the switch by then.

My motivation for working on Streamlink Twitch GUI has been fading more and more though. There's a ton of technical debt which already annoyed me years ago, but overcoming this is pretty much impossible without a full rewrite based on different tech. This is a bottomless pit of work and implementing the helix API changes on the old code is even more annoying, especially when features have to be removed once again. I've been working on this project now since 2013, completely on my own without much help from others apart from translations, mainly because I didn't choose "the cool meme stuff" when it was all new back then and which has then become the "industry standard" today. I've already tried modernizing the code base last year and the year before that, but I never managed to complete it (#737). This is so much work with little gains. It is ungrateful, unpaid and with lots of responsibilities because the app has ten thousands of active users who simply don't want to use the Twitch website for watching streams. Even though I've learned a ton of stuff, it has stopped being fun a long time ago.


Pull request with checklist here:
#852

@gravyboat
Copy link
Member

@bastimeyer Why not just stop maintaining the Twitch GUI? If you're not feeling motivated (and I don't blame you for this at all, you already contribute a ton of unpaid work to Streamlink itself), and the new API sucks even more than the last few iterations it isn't worth your mental energy to keep going. If it's not fun then stop. Pin an issue noting that you're not working on it any more, lock issues/discussions/etc. and EoL the software.

Screw the users, who cares. It's open source software. If they want to maintain it they can fork and continue the maintenance work. It's not all on you to do work that you hate and it's not worth spending your life doing so.

@bastimeyer
Copy link
Member Author

The helix API implementation (#852) should be pretty much finished now. If I don't see any major issues, #852 will be merged by tomorrow.

To be honest, this took longer than expected to implement, but I also wanted to rewrite some poorly written tests and I had to re-implement a couple of other things like the infinite scroll mechanism for example. A couple of things were left out though, and they can be implemented later. No need to take any risks here.

Current diff stats:
master...helix

$ git diff --shortstat master
 259 files changed, 7960 insertions(+), 7595 deletions(-)

If one wants to test this, please go ahead and build from the helix branch. It's possible that there will be a few more force-pushes to the branch though. In that case, fetch and checkout again.

git clone https://github.com/streamlink/streamlink-twitch-gui.git
cd streamlink-twitch-gui
git fetch origin
git checkout origin/helix
yarn install --pure-lockfile
yarn run grunt release

I'm planning on keeping the changes on the master branch for at least until the beginning of February. As mentioned, Twitch said they wanted to perform sporadic tests during February with shutting down kraken, so the 2.0.0 release needs to be prepared and ready by then.

@bastimeyer
Copy link
Member Author

#852 has been merged into master now. I'm re-opening this thread for visibility until the next release.

I'd like to ask everyone who has the time to go ahead and test this before the next release. It's possible that I've missed something and it's also possible that I didn't run into one of the new API bugs (I've already encountered two of those).
Thank you very much.

The next nightly debug builds will include the merged changes, but manually building from the master branch is of course also possible.

As noted, these changes do not include any new features from the helix API. I will implement this later.

The next release will be 2.0.0 and the changelog will include all the details.

@bastimeyer bastimeyer reopened this Jan 24, 2022
@skulblakka
Copy link

I'd like to ask everyone who has the time to go ahead and test this before the next release.

I build the current commit on master and played around with it a bit. Didn't notice any obvious issues.

@disteLLL
Copy link

disteLLL commented Jan 27, 2022

I tried the latest nightly build and so far found no issues or errors. Will keep looking and report if I find something.

Edit: Tested on Windows 10 20H2 and macOS 12.2

@NilsEnevoldsen
Copy link
Contributor

The latest nightly worked well for me on macOS 12.2, though I didn't try anything funny.

My motivation for working on Streamlink Twitch GUI has been fading more and more though.

Thank you for being transparent about this. And thank you for many years of development. I, and no doubt countless others who have never visited this repository, are grateful for your work.

@bastimeyer
Copy link
Member Author

https://github.com/streamlink/streamlink-twitch-gui/releases/tag/v2.0.0

@arrowgent
Copy link

arrowgent commented Feb 9, 2022

leaving note here for anyone curious

v5 shutdown timeline
Given the number of v5 migrations, we wanted to ensure that you have sufficient time to update your applications and that we are reaching developers as soon as possible. A phased shutdown of v5 will begin in February 2022. Here are the shutdown windows:

February 7, 2022 – 1-hour shutdown starting at 11:00am PDT
February 9, 2022 – 2-hour shutdown starting at 11:00am PDT
February 14, 2022 – 4-hour shutdown starting at 11:00am PDT
February 16, 2022 – 6-hour shutdown starting at 11:00am PDT
February 21, 2022 – 24-hour shutdown starting at 11:00am PDT
February 28, 2022 – v5 permanent shutdown

@bastimeyer
Copy link
Member Author

Closing the thread, as it's March now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants