jellyfin / jellyfin-plugin-trakt

https://jellyfin.org
MIT License
173 stars 33 forks source link

Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv #208

Open dukestraykker opened 1 year ago

dukestraykker commented 1 year ago

I am trying to sync a new jellyfin 10.8.9 installation on windows with trakt.tv. I have installed trakt.tv plugin version 23.0.0.0 and it shows active and user is authorized. When i attempt to run the scheduled task "Import watched states and playback progress from trakt.tv" it stalls at 0.0%. I am seeing this record in the logs constantly:

2023-03-09 00:50:00.016 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 1s

2023-03-09 12:59:32.862 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 19s

2023-03-09 12:59:52.138 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 8s

2023-03-09 14:04:59.888 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 1s

2023-03-09 14:14:38.411 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Connectivity error while communicating with trakt.tv - waiting 30s

2023-03-09 14:24:50.304 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 7s

2023-03-09 14:24:57.568 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 1s

2023-03-09 14:24:58.845 +13:00 | DBG | 102 | Trakt.Api.TraktApi: Too many requests while communicating with trakt.tv - waiting 2s

2023-03-09 14:25:00.857 +13:00 | ERR | 152 | Trakt.ScheduledTasks.SyncFromTraktTask: Exception handled System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Trakt.Api.TraktApi.GetFromTraktWithPaging[T](String url, TraktUser traktUser, CancellationToken cancellationToken) at Trakt.Api.TraktApi.SendGetWatchedEpisodesHistoryRequest(TraktUser traktUser) at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, IProgress 1 progress, Double percentPerUser, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncFromTraktTask.ExecuteAsync(IProgress 1 progress, CancellationToken cancellationToken)

2023-03-09 14:25:00.859 +13:00 | ERR | 152 | Trakt.ScheduledTasks.SyncFromTraktTask: Error syncing trakt.tv data for user "Administrator" System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Trakt.Api.TraktApi.GetFromTraktWithPaging[T](String url, TraktUser traktUser, CancellationToken cancellationToken) at Trakt.Api.TraktApi.SendGetWatchedEpisodesHistoryRequest(TraktUser traktUser) at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, IProgress 1 progress, Double percentPerUser, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncFromTraktTask.ExecuteAsync(IProgress 1 progress, CancellationToken cancellationToken)

2023-03-09 14:25:00.861 +13:00 | INF | 152 | Emby.Server.Implementations.ScheduledTasks.TaskManager: "Import watched states and playback progress from trakt.tv" Completed after 108 minute(s) and 27 seconds

2023-03-09 14:25:00.863 +13:00 | INF | 152 | Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks

The issue with too many API calls I believe was already resolved dev side after 10.8.5 and trakt.tv plugin version 21 so may not be related?

zotabee commented 7 months ago

https://github.com/jellyfin/jellyfin-plugin-trakt/issues/174