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:
parent
ab49268bac
commit
54d543faf7
15
src/NzbDrone.Core/Tv/Events/SeriesBulkEditedEvent.cs
Normal file
15
src/NzbDrone.Core/Tv/Events/SeriesBulkEditedEvent.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user