mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-06 06:45:18 -04:00
OPDS Performance Enhancements (#4332)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
@@ -215,19 +215,6 @@ public class MetadataController(IUnitOfWork unitOfWork, IExternalMetadataService
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If this Series is on Kavita+ Blacklist, removes it. If already cached, invalidates it.
|
||||
/// This then attempts to refresh data from Kavita+ for this series.
|
||||
/// </summary>
|
||||
/// <param name="seriesId"></param>
|
||||
/// <returns></returns>
|
||||
// [HttpPost("force-refresh")]
|
||||
// public async Task<ActionResult> ForceRefresh(int seriesId)
|
||||
// {
|
||||
// await metadataService.ForceKavitaPlusRefresh(seriesId);
|
||||
// return Ok();
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Fetches the details needed from Kavita+ for Series Detail page
|
||||
/// </summary>
|
||||
@@ -263,16 +250,15 @@ public class MetadataController(IUnitOfWork unitOfWork, IExternalMetadataService
|
||||
if (!isAdmin && ret?.Recommendations != null && user != null)
|
||||
{
|
||||
// Re-obtain owned series and take into account age restriction
|
||||
var seriesIds = ret.Recommendations.OwnedSeries.Select(s => s.Id);
|
||||
ret.Recommendations.OwnedSeries =
|
||||
await unitOfWork.SeriesRepository.GetSeriesDtoByIdsAsync(
|
||||
ret.Recommendations.OwnedSeries.Select(s => s.Id), user);
|
||||
await unitOfWork.SeriesRepository.GetSeriesDtoByIdsAsync(seriesIds, user);
|
||||
ret.Recommendations.ExternalSeries = [];
|
||||
}
|
||||
|
||||
if (ret?.Recommendations != null && user != null)
|
||||
{
|
||||
ret.Recommendations.OwnedSeries ??= [];
|
||||
await unitOfWork.SeriesRepository.AddSeriesModifiers(user.Id, ret.Recommendations.OwnedSeries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user