1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 08:22:35 +01:00
Sonarr/NzbDrone.Core/Jobs/EpisodeSearchJob.cs

40 lines
951 B
C#
Raw Normal View History

2011-12-02 02:33:17 +01:00
using System.Linq;
using System;
using NzbDrone.Core.Model.Notification;
2011-12-02 02:33:17 +01:00
using NzbDrone.Core.Providers;
2011-12-02 02:33:17 +01:00
namespace NzbDrone.Core.Jobs
{
public class EpisodeSearchJob : IJob
{
private readonly SearchProvider _searchProvider;
public EpisodeSearchJob(SearchProvider searchProvider)
{
_searchProvider = searchProvider;
}
public EpisodeSearchJob()
{
}
public string Name
{
get { return "Episode Search"; }
}
public TimeSpan DefaultInterval
{
get { return TimeSpan.FromTicks(0); }
}
2012-09-10 21:04:17 +02:00
public virtual void Start(ProgressNotification notification, dynamic options)
{
2012-09-10 21:04:17 +02:00
if (options == null || options.EpisodeId <= 0)
throw new ArgumentException("options");
2011-05-27 05:54:28 +02:00
2012-09-10 21:04:17 +02:00
_searchProvider.EpisodeSearch(notification, options.EpisodeId);
}
}
}