mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
event based cleanup when a series is deleted.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace NzbDrone.Core.Tv
|
||||
void UpdateFromSeriesEditor(IList<Series> editedSeries);
|
||||
Series FindByTvdbId(int tvdbId);
|
||||
void SetSeriesType(int seriesId, SeriesTypes seriesTypes);
|
||||
void DeleteSeries(int seriesId);
|
||||
void DeleteSeries(int seriesId, bool deleteFiles);
|
||||
}
|
||||
|
||||
public class SeriesService : ISeriesService
|
||||
@@ -167,11 +167,11 @@ namespace NzbDrone.Core.Tv
|
||||
_seriesRepository.SetSeriesType(seriesId, seriesTypes);
|
||||
}
|
||||
|
||||
public void DeleteSeries(int seriesId)
|
||||
public void DeleteSeries(int seriesId, bool deleteFiles)
|
||||
{
|
||||
var series = _seriesRepository.Get(seriesId);
|
||||
_seriesRepository.Delete(seriesId);
|
||||
_eventAggregator.Publish(new SeriesDeletedEvent(series));
|
||||
_eventAggregator.Publish(new SeriesDeletedEvent(series, deleteFiles));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user