mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-17 10:45:49 +02:00
Rescan all series via RescanSeriesCommand
This commit is contained in:
parent
073b496197
commit
946406f456
@ -4,7 +4,7 @@ namespace NzbDrone.Core.MediaFiles.Commands
|
||||
{
|
||||
public class RescanSeriesCommand : Command
|
||||
{
|
||||
public int SeriesId { get; set; }
|
||||
public int? SeriesId { get; set; }
|
||||
|
||||
public override bool SendUpdatesToClient
|
||||
{
|
||||
|
@ -111,9 +111,21 @@ public void Handle(SeriesUpdatedEvent message)
|
||||
|
||||
public void Execute(RescanSeriesCommand message)
|
||||
{
|
||||
var series = _seriesService.GetSeries(message.SeriesId);
|
||||
if (message.SeriesId.HasValue)
|
||||
{
|
||||
var series = _seriesService.GetSeries(message.SeriesId.Value);
|
||||
Scan(series);
|
||||
}
|
||||
|
||||
Scan(series);
|
||||
else
|
||||
{
|
||||
var allSeries = _seriesService.GetAllSeries();
|
||||
|
||||
foreach (var series in allSeries)
|
||||
{
|
||||
Scan(series);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user