mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
added delete series event
This commit is contained in:
parent
80ac142434
commit
cc1dcffdf3
3 changed files with 23 additions and 2 deletions
|
@ -8,7 +8,6 @@ using NzbDrone.Core.Configuration;
|
|||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.MetadataSource;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.ReferenceData;
|
||||
using NzbDrone.Core.Tv.Events;
|
||||
|
@ -24,6 +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);
|
||||
}
|
||||
|
||||
public class SeriesService : ISeriesService
|
||||
|
@ -167,6 +167,11 @@ namespace NzbDrone.Core.Tv
|
|||
_seriesRepository.SetSeriesType(seriesId, seriesTypes);
|
||||
}
|
||||
|
||||
|
||||
public void DeleteSeries(int seriesId)
|
||||
{
|
||||
var series = _seriesRepository.Get(seriesId);
|
||||
_seriesRepository.Delete(seriesId);
|
||||
_eventAggregator.Publish(new SeriesDeletedEvent(series));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue