TwitchDropsMiner icon indicating copy to clipboard operation
TwitchDropsMiner copied to clipboard

Completing one campaign completes both for the same game

Open mgbeck002 opened this issue 2 years ago • 3 comments

I've been experiencing this with Out of the Park Baseball. They typically have an official and an affiliate campaign each day, as shown in the screenshot below. image

So far today, only affiliates have streamed and I should still have the "Official" campaign available to me, but it's marked as completed in the application and the application will no longer join the official channel.

Inventory screenshot: image

This is with commit 91f2dacbcce14d3dbc7519bcbff61d1da5ebcb00 on Windows 11, running both as a built executable and when run as a python application directly.

mgbeck002 avatar Jan 18 '24 01:01 mgbeck002

Hello o/

I've roughly explained "the issue" of trying to determine if a campaign has been finished or not, here: https://github.com/DevilXD/TwitchDropsMiner/issues/334#issuecomment-1779920333

There is no fix for this, the logic works correctly. The developer of this campaign has used repeating benefits, which can "cross-claim" a campaign in the miner like that. It works like this:

  • You mine a campaign which has a drop with a repeating benefit X.
  • There's another campaign active at the same time, with all drops that have the same benefit to it.
  • The logic processes the second campaign and determines that all drops from it have already been claimed (from the first campaign), because all benefits from it were claimed while the campaign was active.
  • The result is a not-started-yet campaign being all marked as claimed and finished.

That's the bad news. The good news is that - you can force a campaign like that to appear in your inventory, by watching an applicable channel for at least one minute. Once it does so, and all drops receive a 0% progression bar, the miner will automatically pick up on that, and should continue from there - after a reload, of course. Every further campaign that runs into this issue, has to be started "manually" like this.

Please let me know if that worked out for you.

DevilXD avatar Jan 18 '24 06:01 DevilXD

Thanks. Yeah. That workaround seems to work. For my curiosity, what part of the code is the part that claims the drops?

mgbeck002 avatar Jan 20 '24 12:01 mgbeck002

Thanks. Yeah. That workaround seems to work.

Cool =)

For my curiosity, what part of the code is the part that claims the drops?

The exact code that performs the claim operation is here: https://github.com/DevilXD/TwitchDropsMiner/blob/b655803bf5270f0b58ec5fa3d0270e6a2049b841/inventory.py#L146-L170

But to authorize the claim, you need to have an authorization key (a string of characters obtained back from the login procedure, that authorizes each request to the Twitch servers the miner makes), and a claim ID, that's generated by Twitch once the drop progress reaches 100%.

DevilXD avatar Jan 20 '24 13:01 DevilXD