v0.8.4.2 - Hotfix (#3422)

This commit is contained in:
Joe Milazzo 2024-11-27 13:29:10 -06:00 committed by GitHub
parent 19b0163da7
commit 85d0d1f0f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 15 deletions

View File

@ -92,7 +92,7 @@ public class ChapterController : BaseApiController
/// Deletes multiple chapters and any volumes with no leftover chapters /// Deletes multiple chapters and any volumes with no leftover chapters
/// </summary> /// </summary>
/// <param name="seriesId">The ID of the series</param> /// <param name="seriesId">The ID of the series</param>
/// <param name="chapterIds">The IDs of the chapters to be deleted</param> /// <param name="dto">The IDs of the chapters to be deleted</param>
/// <returns></returns> /// <returns></returns>
[Authorize(Policy = "RequireAdminRole")] [Authorize(Policy = "RequireAdminRole")]
[HttpPost("delete-multiple")] [HttpPost("delete-multiple")]
@ -255,7 +255,7 @@ public class ChapterController : BaseApiController
// Update writers // Update writers
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Writers.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Writers.Select(p => p.Name).ToList(),
PersonRole.Writer, PersonRole.Writer,
_unitOfWork _unitOfWork
); );
@ -263,7 +263,7 @@ public class ChapterController : BaseApiController
// Update characters // Update characters
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Characters.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Characters.Select(p => p.Name).ToList(),
PersonRole.Character, PersonRole.Character,
_unitOfWork _unitOfWork
); );
@ -271,7 +271,7 @@ public class ChapterController : BaseApiController
// Update pencillers // Update pencillers
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Pencillers.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Pencillers.Select(p => p.Name).ToList(),
PersonRole.Penciller, PersonRole.Penciller,
_unitOfWork _unitOfWork
); );
@ -279,7 +279,7 @@ public class ChapterController : BaseApiController
// Update inkers // Update inkers
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Inkers.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Inkers.Select(p => p.Name).ToList(),
PersonRole.Inker, PersonRole.Inker,
_unitOfWork _unitOfWork
); );
@ -287,7 +287,7 @@ public class ChapterController : BaseApiController
// Update colorists // Update colorists
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Colorists.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Colorists.Select(p => p.Name).ToList(),
PersonRole.Colorist, PersonRole.Colorist,
_unitOfWork _unitOfWork
); );
@ -295,7 +295,7 @@ public class ChapterController : BaseApiController
// Update letterers // Update letterers
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Letterers.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Letterers.Select(p => p.Name).ToList(),
PersonRole.Letterer, PersonRole.Letterer,
_unitOfWork _unitOfWork
); );
@ -303,7 +303,7 @@ public class ChapterController : BaseApiController
// Update cover artists // Update cover artists
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.CoverArtists.Select(p => Parser.Normalize(p.Name)).ToList(), dto.CoverArtists.Select(p => p.Name).ToList(),
PersonRole.CoverArtist, PersonRole.CoverArtist,
_unitOfWork _unitOfWork
); );
@ -311,7 +311,7 @@ public class ChapterController : BaseApiController
// Update editors // Update editors
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Editors.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Editors.Select(p => p.Name).ToList(),
PersonRole.Editor, PersonRole.Editor,
_unitOfWork _unitOfWork
); );
@ -319,7 +319,7 @@ public class ChapterController : BaseApiController
// Update publishers // Update publishers
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Publishers.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Publishers.Select(p => p.Name).ToList(),
PersonRole.Publisher, PersonRole.Publisher,
_unitOfWork _unitOfWork
); );
@ -327,7 +327,7 @@ public class ChapterController : BaseApiController
// Update translators // Update translators
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Translators.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Translators.Select(p => p.Name).ToList(),
PersonRole.Translator, PersonRole.Translator,
_unitOfWork _unitOfWork
); );
@ -335,7 +335,7 @@ public class ChapterController : BaseApiController
// Update imprints // Update imprints
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Imprints.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Imprints.Select(p => p.Name).ToList(),
PersonRole.Imprint, PersonRole.Imprint,
_unitOfWork _unitOfWork
); );
@ -343,7 +343,7 @@ public class ChapterController : BaseApiController
// Update teams // Update teams
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Teams.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Teams.Select(p => p.Name).ToList(),
PersonRole.Team, PersonRole.Team,
_unitOfWork _unitOfWork
); );
@ -351,7 +351,7 @@ public class ChapterController : BaseApiController
// Update locations // Update locations
await PersonHelper.UpdateChapterPeopleAsync( await PersonHelper.UpdateChapterPeopleAsync(
chapter, chapter,
dto.Locations.Select(p => Parser.Normalize(p.Name)).ToList(), dto.Locations.Select(p => p.Name).ToList(),
PersonRole.Location, PersonRole.Location,
_unitOfWork _unitOfWork
); );

View File

@ -343,7 +343,7 @@ public class SeriesService : ISeriesService
var existingPeople = await _unitOfWork.PersonRepository.GetPeopleByNames(normalizedNames); var existingPeople = await _unitOfWork.PersonRepository.GetPeopleByNames(normalizedNames);
// Use a dictionary for quick lookups // Use a dictionary for quick lookups
var existingPeopleDictionary = existingPeople.ToDictionary(p => p.NormalizedName, p => p); var existingPeopleDictionary = existingPeople.DistinctBy(p => p.NormalizedName).ToDictionary(p => p.NormalizedName, p => p);
// List to track people that will be added to the metadata // List to track people that will be added to the metadata
var peopleToAdd = new List<Person>(); var peopleToAdd = new List<Person>();