mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-22 07:43:01 +00:00
Fixed: Series updated during Import List Sync not reflected in the UI
Closes #7511
This commit is contained in:
parent
ab49268bac
commit
54d543faf7
3 changed files with 28 additions and 0 deletions
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 @@ namespace NzbDrone.Core.Tv
|
|||
|
||||
_seriesRepository.UpdateMany(series);
|
||||
_logger.Debug("{0} series updated", series.Count);
|
||||
_eventAggregator.PublishEvent(new SeriesBulkEditedEvent(series));
|
||||
|
||||
return series;
|
||||
}
|
||||
|
@ -298,6 +299,8 @@ namespace NzbDrone.Core.Tv
|
|||
return true;
|
||||
}
|
||||
|
||||
_logger.Debug("Tags not updated for '{0}'", series.Title);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ namespace Sonarr.Api.V3.Series
|
|||
IHandle<SeriesEditedEvent>,
|
||||
IHandle<SeriesDeletedEvent>,
|
||||
IHandle<SeriesRenamedEvent>,
|
||||
IHandle<SeriesBulkEditedEvent>,
|
||||
IHandle<MediaCoversUpdatedEvent>
|
||||
{
|
||||
private readonly ISeriesService _seriesService;
|
||||
|
@ -338,6 +339,15 @@ namespace Sonarr.Api.V3.Series
|
|||
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 a new issue