Closed DavidGhetto closed 1 year ago
Thanks for the report. Trakt must of introduced rate limiting on their API now so will need to add support to handle it. I'll look into it.
Made a quick retry method to handle this event. You should now see something like this in the log and a retry after X seconds:
2023-03-05 11:54:14.677 [INFO] [][01]: [9/9] Removing all episodes of Game of Thrones from trakt.tv watched history
2023-03-05 11:54:14.677 [DEBG] [][03]: Address: https://api.trakt.tv/sync/history/remove, Post: {"shows":[{"ids":{"trakt":1390},"title":null,"year":null}]}
2023-03-05 11:54:14.936 [ERR ] [][03]: Response: The remote server returned an error: (429) Too Many Requests. {"name":"AUTHED_API_POST_LIMIT","period":1,"limit":1,"remaining":0,"until":"2023-03-05T00:54:18Z"}. Waiting 1 seconds before trying again.
2023-03-05 11:54:15.937 [DEBG] [][03]: Address: https://api.trakt.tv/sync/history/remove, Post: {"shows":[{"ids":{"trakt":1390},"title":null,"year":null}]}
2023-03-05 11:54:16.293 [DEBG] [][03]: Response: {"deleted":{"movies":0,"episodes":1},"not_found":{"movies":[],"shows":[],"seasons":[],"episodes":[],"people":[],"users":[]}}
Trakt API has rate limiting that allows 1 POST call per second: https://trakt.docs.apiary.io/#introduction/rate-limiting
When I try to import a large IMDb list, it fails because it doesn't respect the limits and the client receives a 429 response: