mirror of
https://github.com/Radarr/Radarr
synced 2025-02-26 16:13:19 +00:00
Rescan all series via RescanSeriesCommand
This commit is contained in:
parent
073b496197
commit
946406f456
2 changed files with 15 additions and 3 deletions
|
@ -4,7 +4,7 @@ namespace NzbDrone.Core.MediaFiles.Commands
|
||||||
{
|
{
|
||||||
public class RescanSeriesCommand : Command
|
public class RescanSeriesCommand : Command
|
||||||
{
|
{
|
||||||
public int SeriesId { get; set; }
|
public int? SeriesId { get; set; }
|
||||||
|
|
||||||
public override bool SendUpdatesToClient
|
public override bool SendUpdatesToClient
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,9 +111,21 @@ public void Handle(SeriesUpdatedEvent message)
|
||||||
|
|
||||||
public void Execute(RescanSeriesCommand 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var allSeries = _seriesService.GetAllSeries();
|
||||||
|
|
||||||
|
foreach (var series in allSeries)
|
||||||
|
{
|
||||||
Scan(series);
|
Scan(series);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue