[CHANGE] Small optimizations

This commit is contained in:
max
2025-09-28 18:34:45 +02:00
parent c170b8db1f
commit a2a420d596
3 changed files with 3 additions and 3 deletions

View File

@@ -228,7 +228,7 @@ public class LibraryService : ILibraryService
return ResultError.Error(e);
}
if (context.Channels.Any(c => c.Id == innertubeChannel.Id))
if (channelResult.IsSuccess)
{
context.Channels.Update(channelEntity);
}

View File

@@ -107,7 +107,7 @@ public class ClientService(IServiceScopeFactory scopeFactory, ILogger<ClientServ
}
List<HttpCookieEntity> httpCookies = [];
httpCookies.AddRange(client.CookieContainer.GetAllCookies()
httpCookies.AddRange(client.CookieContainer.GetAllCookies().Where(c => c.Expires != DateTime.MinValue)
.ToList()
.Select(cookie => new HttpCookieEntity
{