thesadru / genshinstats

PLEASE USE GENSHIN.PY A python library that can get the stats of Genshin Impact players using Mihoyo's API. PLEASE USE GENSHIN.PY
https://thesadru.github.io/pdoc/genshinstats/
MIT License
265 stars 38 forks source link

[Question] Genshin commissions not updating #48

Closed Wollus closed 2 years ago

Wollus commented 2 years ago

This isn't actually an issue with your library, but more of a question that you may have the answer to. I found that the resin values get updated within ~30-60 seconds, but I noticed that the commission count and daily reward boolean hasn't updated in over an hour. Is that normal? Do you know if there's a commission-specific setting that I might need to enable/disable to get this to update properly?

Example API response snippet:

{'retcode': 0, 'message': 'OK', 'data': {'current_resin': 2, 'max_resin': 160, 'resin_recovery_time': '75724', 'finished_task_num': 0, 'total_task_num': 4, 'is_extra_task_reward_received': False, 'remain_resin_discount_num': 0, 'resin_discount_num_limit': 3, 'current_expedition_num': 5, 'max_expedition_num': 5, 'expeditions': [...]

finished_task_num is 0, even though I compelted my commissions >1hr ago.

Amazing library, btw. Keep it up!!

Thanks!

thesadru commented 2 years ago

For me it generally updates at the same rate as resin so I'm unsure as to why you'd be experiencing such a major delay.

Wollus commented 2 years ago

Odd. Sanity check: 'finished_task_num' or 'completed_commissions" are in fact the purple commissions/quests that you get 4 of each day? I'll try again tomorrow. Hopefully it was a fluke?

Wollus commented 2 years ago

I'm going to close this issue. I opened up the hoyolab app and I see the exact same commission data that the API is vending, which does not match the in-game values (even though the resin is 100% accurate, so I know I'm hitting the correct account).

Thanks for the info!

Wollus commented 2 years ago

Final update: It started working as expected today with no changes on my end :)

Wollus commented 2 years ago

I have a bit more info. The commission count incorrectly resets to zero 4 hours before it's supposed to. I tried to look for a timezone setting through hoyolab but couldn't find one. Hopefully it gets fixed, but I don't think there's anything we can do on our end.

thesadru commented 2 years ago

It's most likely just using Chinese reset times since that's where the servers are located.

Wollus commented 2 years ago

That's a great theory. I'd hope that it would use the account's region, but I'll work around it locally in an ugly way, instead, haha.

Thanks again for the wonderful library!