RakambdaOrg / ChannelPointsMiner

Watch Twitch streams and earn channel points
GNU Affero General Public License v3.0
67 stars 11 forks source link

Fix incorrect watch time tracking #834

Closed jabbink closed 1 month ago

jabbink commented 1 month ago

Pull Request Etiquette

Checklist

Type of change

Bug fix

Description

There are two issues with watch time tracking that result in missed WATCH_STREAK events:

  1. Both SendMinutesWatched instances increase the watchtime despite one triggering 4 times a minute, and one once a minute, increasing watchtime by 5 minutes per minute. This change prevents the M3U8 tracker (4 times a minute) to increase watch time in the internal counter
  2. Sometimes streamers go live for a minute, something breaks, they stop, and restart quickly. This would reset last offline immediately, preventing the next go-live to be seen as eligible for a WATCH_STREAK. This PR will only reset the last offline tracker if we have watched them for long enough.
Rakambda commented 1 month ago

Thank you