1
0
Fork 0
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:
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 @@ 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;
}
}

View file

@ -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)
{