diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj
index 7304b73ca..3de173990 100644
--- a/NzbDrone.Core/NzbDrone.Core.csproj
+++ b/NzbDrone.Core/NzbDrone.Core.csproj
@@ -265,6 +265,7 @@
+
diff --git a/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs b/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs
new file mode 100644
index 000000000..cc9d242e6
--- /dev/null
+++ b/NzbDrone.Core/Tv/Events/SeriesDeletedEvent.cs
@@ -0,0 +1,15 @@
+using System.Linq;
+using NzbDrone.Common.Eventing;
+
+namespace NzbDrone.Core.Tv.Events
+{
+ public class SeriesDeletedEvent : IEvent
+ {
+ public Series Series { get; private set; }
+
+ public SeriesDeletedEvent(Series series)
+ {
+ Series = series;
+ }
+ }
+}
\ No newline at end of file
diff --git a/NzbDrone.Core/Tv/SeriesService.cs b/NzbDrone.Core/Tv/SeriesService.cs
index b7e4c8316..11415fa6c 100644
--- a/NzbDrone.Core/Tv/SeriesService.cs
+++ b/NzbDrone.Core/Tv/SeriesService.cs
@@ -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 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));
+ }
}
}