LeagueOfPoro / EsportsCapsuleFarmer

Automatically watch all live matches on lolesports and farm Esports Capsules
https://www.youtube.com/c/LeagueOfPoro
Other
95 stars 23 forks source link

The rewards check log only uses the last match's name #31

Closed TheFeelTrain closed 1 year ago

TheFeelTrain commented 1 year ago

The rewards check log only uses the name of the last match in the list. I am 95% sure it is still iterating over all of them for the check itself, and just the name in the log is incorrect (although I could be wrong). I tried looking over the code it several times and I'm not sure why this is even happening.

For example with six matches running:

INFO: 2022/07/28 10:55:32 - There are 6 matches live
INFO: 2022/07/28 10:55:47 - superliga is not eligible for rewards. Retrying...
INFO: 2022/07/28 10:55:49 - Twitch quality set successfully
INFO: 2022/07/28 10:55:50 - superliga is eligible for rewards ✓
INFO: 2022/07/28 10:55:50 - superliga is eligible for rewards ✓
INFO: 2022/07/28 10:55:50 - superliga is eligible for rewards ✓
INFO: 2022/07/28 10:55:50 - superliga is eligible for rewards ✓
INFO: 2022/07/28 10:55:50 - superliga is eligible for rewards ✓
INFO: 2022/07/28 10:55:50 - superliga is eligible for rewards ✓
INFO: 2022/07/28 10:55:50 - Next check: 2022-07-28 11:05:50.303748
INFO: 2022/07/28 11:05:58 - There are 6 matches live
INFO: 2022/07/28 11:05:58 - superliga is eligible for rewards ✓
INFO: 2022/07/28 11:05:58 - superliga is eligible for rewards ✓
INFO: 2022/07/28 11:05:58 - superliga is eligible for rewards ✓
INFO: 2022/07/28 11:05:58 - superliga is eligible for rewards ✓
INFO: 2022/07/28 11:05:58 - superliga is eligible for rewards ✓
INFO: 2022/07/28 11:05:58 - superliga is eligible for rewards ✓
INFO: 2022/07/28 11:05:58 - Next check: 2022-07-28 11:15:58.915814

Or from earlier this morning when 3 matches were running:

INFO: 2022/07/28 05:07:32 - Next check: 2022-07-28 05:17:32.681694
INFO: 2022/07/28 05:17:40 - There are 3 matches live
INFO: 2022/07/28 05:17:40 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:17:40 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:17:40 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:17:40 - Next check: 2022-07-28 05:27:40.952531
INFO: 2022/07/28 05:27:49 - There are 3 matches live
INFO: 2022/07/28 05:27:49 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:27:49 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:27:49 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:27:49 - Next check: 2022-07-28 05:37:49.904277
INFO: 2022/07/28 05:37:58 - There are 3 matches live
INFO: 2022/07/28 05:37:58 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:37:58 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:37:58 - lck is eligible for rewards ✓
INFO: 2022/07/28 05:37:58 - Next check: 2022-07-28 05:47:58.155098

You get the idea. Every single log entry has whichever match name is last in the currently running game list.

LeagueOfPoro commented 1 year ago

That was fixed in commit c80176d30acdfe8fecb4f5ecd641e2e3df357e56

TheFeelTrain commented 1 year ago

Oh wow somehow my last pull happened to be in the hour inbetween the commit for the check and the log fix. That's my bad for not checking first. Thank you!