Nightly Issues (2) (#2619)

This commit is contained in:
Joe Milazzo 2024-01-18 12:32:20 -06:00 committed by GitHub
parent a9cde5eaf7
commit 601acf5a84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -643,6 +643,7 @@ public class ScrobblingService : IScrobblingService
.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)
@ -886,6 +887,7 @@ public class ScrobblingService : IScrobblingService
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))