Skip to content

Commit

Permalink
When processing scrobble history, don't try to process users that don…
Browse files Browse the repository at this point in the history
…'t have an aniList token
  • Loading branch information
majora2007 committed Jan 18, 2024
1 parent a2957a5 commit b19ee67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions API/Services/Plus/ScrobblingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ public async Task ProcessUpdatesSinceLastSync()
.Concat(addToWantToRead.Select(r => r.AppUser))
.Concat(removeWantToRead.Select(r => r.AppUser))
.Concat(ratingEvents.Select(r => r.AppUser))
.Where(user => !string.IsNullOrEmpty(user.AniListAccessToken))
.DistinctBy(u => u.Id)
.ToList();
foreach (var user in usersToScrobble)
Expand Down Expand Up @@ -886,6 +887,7 @@ private static IList<ScrobbleProvider> GetUserProviders(AppUser appUser)

private async Task<int> SetAndCheckRateLimit(IDictionary<int, int> userRateLimits, AppUser user, string license)
{
if (string.IsNullOrEmpty(user.AniListAccessToken)) return 0;
try
{
if (!userRateLimits.ContainsKey(user.Id))
Expand Down

0 comments on commit b19ee67

Please sign in to comment.