ShokoAnime / ShokoServer

Repository for Shoko Server.
http://shokoanime.com/shoko-server/
MIT License
374 stars 74 forks source link

Work on CheckForTraktTokenUpdate #1098

Closed krbrs closed 5 months ago

krbrs commented 5 months ago

Have it read the expiration time from settings and not just refresh the token every 24h, only if it's going to expire in 45 days

krbrs commented 5 months ago

I could not test expiration and renewal yet. But at least I get a proper output of the token valid date in the logs while it's still valid and it does not try renewing it until a certain amount of time (45 days / 1/2 of the validity)

If someone can look into this code and optimize it if needed (or give feedback), that would be great