1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00
Sonarr/NzbDrone.Core/Jobs/EpisodeSearchJob.cs

42 lines
977 B
C#
Raw Normal View History

2011-12-02 04:33:17 +03:00
using System.Linq;
using System;
using Ninject;
using NzbDrone.Core.Model.Notification;
2011-12-02 04:33:17 +03:00
using NzbDrone.Core.Providers;
2011-12-02 04:33:17 +03:00
namespace NzbDrone.Core.Jobs
{
public class EpisodeSearchJob : IJob
{
private readonly SearchProvider _searchProvider;
[Inject]
public EpisodeSearchJob(SearchProvider searchProvider)
{
_searchProvider = searchProvider;
}
public EpisodeSearchJob()
{
}
public string Name
{
get { return "Episode Search"; }
}
public TimeSpan DefaultInterval
{
get { return TimeSpan.FromTicks(0); }
}
public virtual void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
{
2011-05-27 06:54:28 +03:00
if (targetId <= 0)
throw new ArgumentOutOfRangeException("targetId");
_searchProvider.EpisodeSearch(notification, targetId);
}
}
}