Tkd-Alex / Twitch-Channel-Points-Miner-v2

A simple script that will watch a stream for you and earn the channel points.
GNU General Public License v3.0
1.22k stars 678 forks source link

better 'Watch Streak' strategy in priority system #11

Closed testdev123456 closed 3 years ago

testdev123456 commented 3 years ago

I opened this suggestion in the original project, but didn't get a single comment.. so... here it goes...

Since a Watch Streak gives 450 points by viewing only (five?) minutes of a stream, I would modify the priority system to 'forget' priorities for a minute and switch to the newest live stream until collects the 450 points, then resume normally watching the top priority live stream. I think it makes sense giving up just 10 points (5 minutes) of a top streamer in order to grab the 450 points of my 3rd or 4th ranked live stream.

I don't know much about coding... but there should be a variable that remembers if I recently got the 450 from that streamer.. if so, there will be no 'switch' to that new stream (maybe it's a streamer with bad connection or connects many times a day).. Also, if we switch to grab the 450... and after 5... 6 minutes nothing happens.... abort and go back to watch the highest priority. Sometimes that 450 bonus fails to be awarded for some reason..

thanks for reading !

Tkd-Alex commented 3 years ago

Hi! I've already read this issue on the original repository and I think It's a good idea! :smile: This feature is a little tricky compared to the other issues, I think I'll do in a separate branch for don't break anything in the master branch :laughing:

From: https://help.twitch.tv/s/article/channel-points-guide?language=en_US

Viewers receive points for returning for x consecutive streams. Each stream must be at least 10 minutes long and it must have been at least 30 minutes since the last stream ended.

testdev123456 commented 3 years ago

working great so far !

Does it also remember the time a streamer went offline to then compare it to the time that went back online and check if passed more than 30 minutes? ( because we are enabled to get another 'watch streak' bonus )

"Each stream must be at least 10 minutes long and it must have been at least 30 minutes since the last stream ended"

https://help.twitch.tv/s/article/channel-points-guide?language=en_US

Tkd-Alex commented 3 years ago

Thanks for the feedback, if you have other issues/news please write here.

working great so far !

Really? :rofl: I haven't already tested as well..

Does it also remember the time a streamer went offline to then compare it to the time that went back online and check if passed more than 30 minutes? ( because we are enabled to get another 'watch streak' bonus )

Mhh yes, should working! https://github.com/Tkd-Alex/Twitch-Channel-Points-Miner-v2/blob/ee0882dcf49a571f9cbb59c512e3229e40eb1540/TwitchChannelPointsMiner/classes/Twitch.py#L206-L213

The conditions for change priority are:

testdev123456 commented 3 years ago

under this new branch the Raids are broken. Working fine in master branch.

25/01 03:20:28 - Exception raised for topic: raid and message: {'type': 'raid_update_v2', 'raid': {'id': '758a163b-7d9g-48e3-97ee-67brd61ec17f', 'creator_id': '264745645', 'source_id': '264745645', 'target_id': '484485554', 'target_login': 'xxxx', 'target_display_name': 'xxxx', 'target_profile_image': 'https://static-cdn.jtvnw.net/jtv_user_pictures/1dec6a76-d94g-44n1-beb7-5155fd646916-profile_image-70x70.png', 'transition_jitter_seconds': 0, 'force_raid_now_seconds': 90, 'viewer_count': 6}}
Traceback (most recent call last):
  File "C:\Users\default\Twitch-Channel-Points-Miner-v2\TwitchChannelPointsMiner\classes\WebSocketsPool.py", line 164, in on_message
    message["raid"]["id"], message["raid"]["target_login"]
TypeError: 'Message' object is not subscriptable

Python 3.8.7 - Windows - Chrome

Tkd-Alex commented 3 years ago

You are not on the latest commit šŸ˜‰

I've also reference the commit in the issue where you haveĀ anticipated the problem with raid

Commit: 19c755eaf8e68a4bc78992035ac39c9ae1a28941

Issue: #13