Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
Joe Milazzo 2025-02-19 15:06:54 -06:00 committed by GitHub
parent b858729c9e
commit 9565fe7360
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 777 additions and 314 deletions

View file

@ -752,7 +752,7 @@ public class ExternalMetadataService : IExternalMetadataService
_unitOfWork.SeriesRepository.Update(series);
await _unitOfWork.CommitAsync();
await DownloadAndSetCovers(upstreamArtists);
await DownloadAndSetPersonCovers(upstreamArtists);
return true;
}
@ -809,7 +809,7 @@ public class ExternalMetadataService : IExternalMetadataService
_unitOfWork.SeriesRepository.Update(series);
await _unitOfWork.CommitAsync();
await DownloadAndSetCovers(upstreamWriters);
await DownloadAndSetPersonCovers(upstreamWriters);
return true;
}
@ -1058,7 +1058,7 @@ public class ExternalMetadataService : IExternalMetadataService
{
try
{
await _coverDbService.SetSeriesCoverByUrl(series, coverUrl, false);
await _coverDbService.SetSeriesCoverByUrl(series, coverUrl, false, true);
}
catch (Exception ex)
{
@ -1066,7 +1066,7 @@ public class ExternalMetadataService : IExternalMetadataService
}
}
private async Task DownloadAndSetCovers(List<SeriesStaffDto> people)
private async Task DownloadAndSetPersonCovers(List<SeriesStaffDto> people)
{
foreach (var staff in people)
{
@ -1075,7 +1075,7 @@ public class ExternalMetadataService : IExternalMetadataService
var person = await _unitOfWork.PersonRepository.GetPersonByAniListId(aniListId.Value);
if (person != null && !string.IsNullOrEmpty(staff.ImageUrl) && string.IsNullOrEmpty(person.CoverImage))
{
await _coverDbService.SetPersonCoverByUrl(person, staff.ImageUrl, false);
await _coverDbService.SetPersonCoverByUrl(person, staff.ImageUrl, false, true);
}
}
}
@ -1326,11 +1326,15 @@ public class ExternalMetadataService : IExternalMetadataService
}
try
{
return await (Configuration.KavitaPlusApiUrl + "/api/metadata/v2/series-by-ids")
var ret = await (Configuration.KavitaPlusApiUrl + "/api/metadata/v2/series-by-ids")
.WithKavitaPlusHeaders(license)
.PostJsonAsync(payload)
.ReceiveJson<ExternalSeriesDetailDto>();
ret.Summary = StringHelper.SquashBreaklines(ret.Summary);
return ret;
}
catch (Exception e)
{