Polish for Release (#3714)

This commit is contained in:
Joe Milazzo 2025-04-08 17:25:37 -06:00 committed by GitHub
parent 9d9938bce2
commit c80d046fc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 3611 additions and 41 deletions

View file

@ -624,8 +624,15 @@ public class ScrobblingService : IScrobblingService
{
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(userId);
if (user == null || string.IsNullOrEmpty(user.AniListAccessToken)) return;
if (user.HasRunScrobbleEventGeneration)
{
_logger.LogWarning("User {UserName} has already run scrobble event generation, Kavita will not generate more events", user.UserName);
return;
}
}
var libAllowsScrobbling = (await _unitOfWork.LibraryRepository.GetLibrariesAsync())
.ToDictionary(lib => lib.Id, lib => lib.AllowScrobbling);
@ -667,6 +674,14 @@ public class ScrobblingService : IScrobblingService
if (series.PagesRead <= 0) continue; // Since we only scrobble when things are higher, we can
await ScrobbleReadingUpdate(uId, series.Id);
}
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(uId);
if (user != null)
{
user.HasRunScrobbleEventGeneration = true;
user.ScrobbleEventGenerationRan = DateTime.UtcNow;
await _unitOfWork.CommitAsync();
}
}
}

View file

@ -536,7 +536,7 @@ public class CoverDbService : ICoverDbService
if (!string.IsNullOrEmpty(filePath))
{
// Additional check to see if downloaded image is similar and we have a higher resolution
if (chooseBetterImage)
if (chooseBetterImage && !string.IsNullOrEmpty(series.CoverImage))
{
try
{