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

prioritize_by_ending_soonest BUG? #94

Open
zelda0079 opened this issue Jun 4, 2024 · 18 comments
Open

prioritize_by_ending_soonest BUG? #94

zelda0079 opened this issue Jun 4, 2024 · 18 comments
Labels
Bug Something isn't working Help needed General or specific issues that require some additional assistance to solve

Comments

@zelda0079
Copy link

Twitch_Drops_Miner_(by_DevilXD)_8r4ihhTRwC
Twitch_Drops_Miner_(by_DevilXD)_AJcMt6owxY
Twitch_Drops_Miner_(by_DevilXD)_dZdDnkrzUt
thorium_D5hRzmYuoA

I think [NAEU] 30 Minute Reward is the soonest twitch drop, and it require specfic streamer, I think there is a bug when the soonest twitch drop is not count which requires specfic streamer.

The Streamer NotNamiko was online on the time.

@zelda0079
Copy link
Author

Miner version is Updated tested build - v15.5.0 (0f42b24)

@Windows200000
Copy link
Owner

Would've been really helpful to see whether Albion appeared in the channel list. I am pretty certain it has nothing to do with the streamers, as possible streams are figured out after determining priority.

That being said there is a bunch more weird stuff. Drop progress from active search is supposed to be shown only once a minute, as a lot of the code still relies on mining in minute intervals. In the version you are using, there should be a bug, that when called more often drop_text should be undefined causing a crash. (fixed in e00187f, but not merged to master and thus not in the latest release)

Because of that, I want to verify, what version you are actually on.

@Windows200000 Windows200000 added the Bug Something isn't working label Jun 4, 2024
@zelda0079
Copy link
Author

zelda0079 commented Jun 4, 2024

Would've been really helpful to see whether Albion appeared in the channel list. I am pretty certain it has nothing to do with the streamers, as possible streams are figured out after determining priority.

That being said there is a bunch more weird stuff. Drop progress from active search is supposed to be shown only once a minute, as a lot of the code still relies on mining in minute intervals. In the version you are using, there should be a bug, that when called more often drop_text should be undefined causing a crash. (fixed in e00187f, but not merged to master and thus not in the latest release)

Because of that, I want to verify, what version you are actually on.

Miner version is Updated tested build - v15.5.0 (0f42b24), latest version in release.

I clicked reload, so the infomation which it shown should be updated.

===========================================================
Interesting

Twitch_Drops_Miner_(by_DevilXD)_zbIa8Iq5Fx
Twitch_Drops_Miner_(by_DevilXD)_dVwVr5I3VG

01:52:18: CALL: Drop progress from active search: Gladiator's Edge BR (Halo Infinite, 19/120)
01:52:22: Earned points for watching:  10, total: 2427915
01:52:24: Claimed bonus points: 50
  **RELOAD AND prioritize_by_ending_soonest turn off**
01:52:24: CALL: AvailableDrops GQL call failed for channel: marrecorj
01:52:24: CALL: AvailableDrops GQL call failed for channel: clownostv
01:52:24: CALL: AvailableDrops GQL call failed for channel: dexxta_
01:52:24: CALL: AvailableDrops GQL call failed for channel: revyll
01:52:24: CALL: AvailableDrops GQL call failed for channel: coryphaeuschampionships
01:52:24: CALL: AvailableDrops GQL call failed for channel: goodvybez
01:52:24: CALL: AvailableDrops GQL call failed for channel: metalmangg
01:52:25: Earned points for watching:  50, total: 2427965
01:52:27: Watching: Caarl
01:52:27: INFO: Websocket[1] connecting...
01:52:27: INFO: Websocket[2] connecting...
01:52:27: INFO: Websocket[3] connecting...
01:52:27: INFO: Websocket[4] connecting...
01:52:27: INFO: Websocket[5] connecting...
01:52:27: INFO: Websocket[6] connecting...
01:52:27: INFO: Websocket[7] connecting...
01:52:27: INFO: Websocket[4] connected.
01:52:27: INFO: Websocket[5] connected.
01:52:27: INFO: Websocket[2] connected.
01:52:27: INFO: Websocket[7] connected.
01:52:27: INFO: Websocket[1] connected.
01:52:27: INFO: Websocket[6] connected.
01:52:27: INFO: Websocket[3] connected.
01:52:39: CALL: No drop update from the websocket received
01:52:39: CALL: Drop progress from active search: 2 Hour (June. 4) (Black Desert, 119/120)
01:53:00: CALL: No drop update from the websocket received
01:53:00: CALL: Drop progress from active search: 2 Hour (June. 4) (Black Desert, 119/120)
01:53:14: CALL: Channel update from websocket: bgkatja
01:53:21: CALL: Drop update from websocket: 30 Minute Reward (Black Desert, 4/30)
01:53:43: CALL: No drop update from the websocket received
01:53:43: CALL: Drop progress from active search: 2 Hour (June. 4) (Black Desert, 119/120)
01:54:03: CALL: No drop update from the websocket received
01:54:03: CALL: Drop progress from active search: 2 Hour (June. 4) (Black Desert, 119/120)
01:54:05: CALL: Maintenance task waiting until: 01:58:59 (Cleanup)
**RELOAD AND prioritize_by_ending_soonest turn on**
01:54:05: INFO: Websocket[6] stopped.
01:54:05: INFO: Websocket[3] stopped.
01:54:05: INFO: Websocket[1] stopped.
01:54:05: INFO: Websocket[7] stopped.
01:54:05: INFO: Websocket[4] stopped.
01:54:05: INFO: Websocket[5] stopped.
01:54:05: INFO: Websocket[2] stopped.
01:54:14: CALL: AvailableDrops GQL call failed for channel: revyll
01:54:14: CALL: AvailableDrops GQL call failed for channel: coryphaeuschampionships
01:54:14: CALL: AvailableDrops GQL call failed for channel: goodvybez
01:54:14: CALL: AvailableDrops GQL call failed for channel: metalmangg
01:54:14: CALL: AvailableDrops GQL call failed for channel: dexxta_
01:54:14: CALL: AvailableDrops GQL call failed for channel: deavild
01:54:16: Watching: EXTREMEBREAKER1
01:54:16: INFO: Websocket[1] connecting...
01:54:16: INFO: Websocket[2] connecting...
01:54:16: INFO: Websocket[3] connecting...
01:54:16: INFO: Websocket[4] connecting...
01:54:16: INFO: Websocket[5] connecting...
01:54:17: INFO: Websocket[6] connecting...
01:54:17: INFO: Websocket[7] connecting...
01:54:17: INFO: Websocket[1] connected.
01:54:17: INFO: Websocket[4] connected.
01:54:17: INFO: Websocket[6] connected.
01:54:17: INFO: Websocket[7] connected.
01:54:17: INFO: Websocket[2] connected.
01:54:17: INFO: Websocket[5] connected.
01:54:17: INFO: Websocket[3] connected.
01:54:24: CALL: No drop update from the websocket received
01:54:24: CALL: Drop progress from active search: Gladiator's Edge BR (Halo Infinite, 21/120)

===========================================================

I may download the e00187f and test it again

@zelda0079
Copy link
Author

@Windows200000
I try 1db7ce6, the branch "in-dev", latest.

Same result, the miner choose the second soonest twitch drop, but this time the first and second both are require specifc channel.

@zelda0079
Copy link
Author

Is the reason it is a 30 minutes twitch drop, less then 1 hour?

@zelda0079
Copy link
Author

@Windows200000
I am not sure, but it may be the real reason.
Twitch_Drops_Miner_(by_DevilXD)_aHiy9koKMA (I call it to Black Desert B)
I tried to finish this twitch drop, and then the miner work normally.
now<Black Desert A<-Holo Infinite<-Black Desert B
So the miner choose Holo Infinite.

@Windows200000
Copy link
Owner

Hi, I spent a bit of time looking at the code, but couldn't find anything. Unless I find the time to completely delve into the sort logic, I don't think I will be able to fix it without having access to the debugger while having this issue.

@Windows200000 Windows200000 added the Help needed General or specific issues that require some additional assistance to solve label Jun 5, 2024
@zelda0079
Copy link
Author

zelda0079 commented Jun 5, 2024

https://github.com/Windows200000/TwitchDropsMiner-updated/blob/master/twitch.py

line 835

                for i, campaign in enumerate(filtered_campaigns):
                    game = campaign.game
                    # get users priority preference
                    game_priority = priorities.get(game.name, 0)
                    if (game_priority):
                        if (prioritize_by_ending_soonest):
                           # list is sorted by end_at so this keeps them in order
                           self.wanted_games[game] = len(filtered_campaigns) - i
                        else:
                            self.wanted_games[game] = game_priority
                    else:
                        self.wanted_games[game] = -i

Add a list to check the game just do
self.wanted_games[game] = len(filtered_campaigns) - i one time only, don't do the second time?
I am not really know the code how it work, just guess.

@Windows200000
Copy link
Owner

Windows200000 commented Jun 5, 2024

@zelda0079 I don't understand what you mean. The line you quoted is only there once.

Also, you can link to the code directly, instead of copy-pasting:
image

@zelda0079
Copy link
Author

@zelda0079 I don't understand what you mean. The line you quoted is only there once.

Also, you can link to the code directly, instead of copy-pasting: image

filtered_campaigns = list(filter(self.filter_campaigns, campaigns))

I try to edit the code,

                filtered_campaigns = list(filter(self.filter_campaigns, campaigns))
                checking=[]
                for i, campaign in enumerate(filtered_campaigns):
                    game = campaign.game
                    # get users priority preference
                    game_priority = priorities.get(game.name, 0)
                    if (game_priority):
                        if (prioritize_by_ending_soonest):
                           if game not in checking:
                               # list is sorted by end_at so this keeps them in order
                               self.wanted_games[game] = len(filtered_campaigns) - i
                               checking.append(game)
                        else:
                            self.wanted_games[game] = game_priority
                    else:
                        self.wanted_games[game] = -i

it seems work.
Twitch_Drops_Miner_(by_DevilXD)_U6uzHap6DU
Twitch_Drops_Miner_(by_DevilXD)_mC2FoagU7w
Twitch_Drops_Miner_(by_DevilXD)_O8IPraqmxA

@zelda0079
Copy link
Author

zelda0079 commented Jun 5, 2024

@zelda0079 I don't understand what you mean. The line you quoted is only there once.
Also, you can link to the code directly, instead of copy-pasting: image

filtered_campaigns = list(filter(self.filter_campaigns, campaigns))

I try to edit the code,

                filtered_campaigns = list(filter(self.filter_campaigns, campaigns))
                checking=[]
                for i, campaign in enumerate(filtered_campaigns):
                    game = campaign.game
                    # get users priority preference
                    game_priority = priorities.get(game.name, 0)
                    if (game_priority):
                        if (prioritize_by_ending_soonest):
                           if game not in checking:
                               # list is sorted by end_at so this keeps them in order
                               self.wanted_games[game] = len(filtered_campaigns) - i
                               checking.append(game)
                        else:
                            self.wanted_games[game] = game_priority
                    else:
                        self.wanted_games[game] = -i

it seems work.
Twitch_Drops_Miner_(by_DevilXD)_U6uzHap6DU
Twitch_Drops_Miner_(by_DevilXD)_mC2FoagU7w
Twitch_Drops_Miner_(by_DevilXD)_O8IPraqmxA

I read my logs, I found that no one was streaming the Kirka.io, I need to find a new test case.

@Windows200000
Copy link
Owner

@zelda0079 I do not see what you mean.
image
This would simply prevent duplicates, that aren't there anyway? How do you think duplicates could get in there?

@Windows200000
Copy link
Owner

@jaredkotoff, it seems like it the sorting by ending soonest doesn't always work.

for i, campaign in enumerate(filtered_campaigns):
game = campaign.game
# get users priority preference
game_priority = priorities.get(game.name, 0)
if (game_priority):
if (prioritize_by_ending_soonest):
# list is sorted by end_at so this keeps them in order
self.wanted_games[game] = len(filtered_campaigns) - i
else:
self.wanted_games[game] = game_priority
else:
self.wanted_games[game] = -i

# list is sorted by end_at so this keeps them in order I suspect it might not always be sorted like this. Could me point to what this comment is referring to?

@zelda0079
Copy link
Author

Finally, it works.

but it choose the second World of Tanks twitch drop, the reason should be it require specifc channel, it should be twitch drop mechanism.
Twitch_Drops_Miner_(by_DevilXD)_nI9BI4cZeU

Twitch_Drops_Miner_(by_DevilXD)_q69lTzzgBw

Twitch_Drops_Miner_(by_DevilXD)_khb3pRZP0r

thorium_bIdKlj30hu

@jaredcat
Copy link

jaredcat commented Jun 6, 2024

@Windows200000 https://github.com/Windows200000/TwitchDropsMiner-updated/blob/master/twitch.py#L1678-L1680

I used to have it sort right here: https://github.com/DevilXD/TwitchDropsMiner/pull/433/files#diff-4769eb01c0ca13db2bd1e0325dc16afaa30a5d607ce1cf9a499696e4a60644a6R834
But removed it because DevilXD said it was unnecessary.

You can see that it's not exactly the same logic. So probably those other sorts are coming into play.

@Windows200000
Copy link
Owner

@jaredkotoff Did he mention where or why it is sorted?

@jaredcat
Copy link

jaredcat commented Jun 6, 2024

@Windows200000 look at the first link in my previous comment

@Windows200000
Copy link
Owner

@jaredkotoff Okay, thanks! I'll take a look at it once I have a bit more time.

jaredcat added a commit to jaredcat/TwitchDropsMiner-modded that referenced this issue Jun 17, 2024
Aims to fix/improve the ending soonest sorting experience Windows200000#94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Help needed General or specific issues that require some additional assistance to solve
Projects
None yet
Development

No branches or pull requests

3 participants