anxdpanic / plugin.video.twitch

Watch your favorite gaming streams on Kodi
https://twitchaddon.page.link/forum
270 stars 79 forks source link

Allow claiming of channel points when logged in #580

Open edwinsage opened 3 years ago

edwinsage commented 3 years ago

What Problem Does This Solve?

Watching channels via this addon when logged in does not earn channel points. Normally points are accumulated roughly every 10 minutes while viewing, and active viewer bonuses can be claimed in the chat window even if chat is being viewed on a different device. This should be enabled in the Kodi Twitch plugin, if Twitch ToS allows.


Suggest a Solution (optional)

Please provide a concise description of your suggested solution. If there are multiple solutions, describe them independently and optionally follow them with a comparison.

There is existing python software to claim channel points, https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2

This could be adapted to allow any of several behaviors, depending on restrictions that Twitch mandates:


PeterPedro commented 3 years ago

Yeah I'd like to see this implemented, could run silently

rjousse18 commented 3 years ago

I hope it will be release !

M-Reimer commented 2 years ago

Does anyone have any information on how Twitch has implemented this? I can profit from "Twitch Turbo" from Kodi so Twitch should know that I access a stream as otherwise this shouldn't work. So it seems like this is some different API endpoint. Probably some kind of "pinging" to some endpoint?

I have found some code that seems to have the required stuff integrated but if someone could point me directly to the relevant API, this would be very helpful.

Let's assume I want to work on this. Are Pull Requests here still handled? Seems to be pretty silent here recently.

apo86 commented 2 years ago

There's no official API, let alone documentation. It's all reverse engineered from the Twitch website. Your best bet would be to look at the repository linked above where they did the work already.

For the bonus channel points (the ones you normally have to click for) there are two GQL operations: ChannelPointsContext will tell you (amongst other things) if there is a bonus available to claim. ClaimCommunityPoints will then allow you to claim it. That part is pretty straight forward.

But I don't know how the passive channel point earning works. Looks like those are not actively claimed, but you have to periodically ping an "I'm still watching" endpoint (which may also be required for getting the bonus channel points to become available again after you claimed them once). But really not sure.