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

better 'Watch Streak' strategy in priority system #11

Closed
testdev123456 opened this issue Jan 22, 2021 · 5 comments · Fixed by #16
Closed

better 'Watch Streak' strategy in priority system #11

testdev123456 opened this issue Jan 22, 2021 · 5 comments · Fixed by #16
Labels
enhancement New feature or request

Comments

@testdev123456
Copy link

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 !

@testdev123456 testdev123456 added the enhancement New feature or request label Jan 22, 2021
@Tkd-Alex
Copy link
Owner

Hi! I've already read this issue on the original repository and I think It's a good idea! 😄
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 😆

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
Copy link
Author

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
Copy link
Owner

Tkd-Alex commented Jan 24, 2021

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

working great so far !

Really? 🤣
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!

if (
streamers[index].watch_streak_missing is True
and (
streamers[index].offline_at == 0
or ((time.time() - streamers[index].offline_at) // 60) > 30
)
and streamers[index].minute_watched <= 6
):

The conditions for change priority are:

  • watch_streak_missing at true
  • never registered the offline time or at least 30 minutes
  • we should watch al least 5 minutes (for get the +10)

@testdev123456
Copy link
Author

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
Copy link
Owner

Tkd-Alex commented Jan 25, 2021

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: 19c755e

Issue: #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants