Don't add ChapterPeople / SeriesMetataPeople if already present for that role and series

Redirects on merge for users currently on that page
This commit is contained in:
Amelia 2025-05-07 18:07:36 +02:00
parent 6ec7e80a43
commit 95dc321bf9
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
5 changed files with 94 additions and 25 deletions

View file

@ -1,5 +1,6 @@
using System;
using API.DTOs.Update;
using API.Entities.Person;
using API.Extensions;
using API.Services.Plus;
@ -147,6 +148,10 @@ public static class MessageFactory
/// Volume is removed from server
/// </summary>
public const string VolumeRemoved = "VolumeRemoved";
/// <summary>
/// A Person merged has been merged into another
/// </summary>
public const string PersonMerged = "PersonMerged";
public static SignalRMessage DashboardUpdateEvent(int userId)
{
@ -661,4 +666,17 @@ public static class MessageFactory
EventType = ProgressEventType.Single,
};
}
public static SignalRMessage PersonMergedMessage(Person dst, Person src)
{
return new SignalRMessage()
{
Name = PersonMerged,
Body = new
{
srcId = src.Id,
dstName = dst.Name,
},
};
}
}