1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-25 02:30:20 +02:00

Fixed: Series updated during Import List Sync not reflected in the UI

Closes #7511
This commit is contained in:
Mark McDowall 2024-12-21 15:12:20 -08:00
parent ab49268bac
commit 54d543faf7
No known key found for this signature in database
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,15 @@
using System.Collections.Generic;
using NzbDrone.Common.Messaging;
namespace NzbDrone.Core.Tv.Events
{
public class SeriesBulkEditedEvent : IEvent
{
public List<Series> Series { get; private set; }
public SeriesBulkEditedEvent(List<Series> series)
{
Series = series;
}
}
}

View File

@ -251,6 +251,7 @@ public List<Series> UpdateSeries(List<Series> series, bool useExistingRelativeFo
_seriesRepository.UpdateMany(series);
_logger.Debug("{0} series updated", series.Count);
_eventAggregator.PublishEvent(new SeriesBulkEditedEvent(series));
return series;
}
@ -298,6 +299,8 @@ public bool UpdateTags(Series series)
return true;
}
_logger.Debug("Tags not updated for '{0}'", series.Title);
return false;
}
}

View File

@ -34,6 +34,7 @@ public class SeriesController : RestControllerWithSignalR<SeriesResource, NzbDro
IHandle<SeriesEditedEvent>,
IHandle<SeriesDeletedEvent>,
IHandle<SeriesRenamedEvent>,
IHandle<SeriesBulkEditedEvent>,
IHandle<MediaCoversUpdatedEvent>
{
private readonly ISeriesService _seriesService;
@ -338,6 +339,15 @@ public void Handle(SeriesRenamedEvent message)
BroadcastResourceChange(ModelAction.Updated, message.Series.Id);
}
[NonAction]
public void Handle(SeriesBulkEditedEvent message)
{
foreach (var series in message.Series)
{
BroadcastResourceChange(ModelAction.Updated, series.ToResource());
}
}
[NonAction]
public void Handle(MediaCoversUpdatedEvent message)
{