v0.8.6.1 - A few small issues Hotfix (#3749)

This commit is contained in:
Joe Milazzo 2025-04-18 06:32:42 -06:00 committed by GitHub
parent e76a7152db
commit a1264cb5e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,7 +178,6 @@ public class StatsService : IStatsService
var sw = Stopwatch.StartNew(); var sw = Stopwatch.StartNew();
var response = await (Configuration.StatsApiUrl + "/api/health/") var response = await (Configuration.StatsApiUrl + "/api/health/")
.WithBasicHeaders(ApiKey) .WithBasicHeaders(ApiKey)
.WithTimeout(TimeSpan.FromSeconds(30))
.GetAsync(); .GetAsync();
if (response.StatusCode == StatusCodes.Status200OK) if (response.StatusCode == StatusCodes.Status200OK)
@ -197,7 +196,7 @@ public class StatsService : IStatsService
private async Task<int> MaxSeriesInAnyLibrary() private async Task<int> MaxSeriesInAnyLibrary()
{ {
// If first time flow, just return 0 // If first time flow, return 0
if (!await _context.Series.AnyAsync()) return 0; if (!await _context.Series.AnyAsync()) return 0;
return await _context.Series return await _context.Series
.Select(s => _context.Library.Where(l => l.Id == s.LibraryId).SelectMany(l => l.Series!).Count()) .Select(s => _context.Library.Where(l => l.Id == s.LibraryId).SelectMany(l => l.Series!).Count())