mirror of https://github.com/lidarr/Lidarr
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 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
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