mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Moved Jobs to their own folder.
This commit is contained in:
parent
cc8c70d7f5
commit
fabc4c84bd
52 changed files with 124 additions and 132 deletions
43
NzbDrone.Core/Jobs/EpisodeSearchJob.cs
Normal file
43
NzbDrone.Core/Jobs/EpisodeSearchJob.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
using System.Linq;
|
||||
using System;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Providers.Jobs;
|
||||
|
||||
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 int DefaultInterval
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public virtual void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
||||
{
|
||||
if (targetId <= 0)
|
||||
throw new ArgumentOutOfRangeException("targetId");
|
||||
|
||||
_searchProvider.EpisodeSearch(notification, targetId);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue