mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
added Marr.Data.Mapping
This commit is contained in:
parent
4bb4faf626
commit
6dd56114e3
29 changed files with 208 additions and 229 deletions
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
@ -19,7 +18,7 @@ namespace NzbDrone.Core.Jobs
|
|||
private readonly IEnumerable<IJob> _jobs;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public JobRepository(IDbConnection database, IEnumerable<IJob> jobs, Logger logger)
|
||||
public JobRepository(IDatabase database, IEnumerable<IJob> jobs, Logger logger)
|
||||
: base(database)
|
||||
{
|
||||
_jobs = jobs;
|
||||
|
@ -28,13 +27,13 @@ namespace NzbDrone.Core.Jobs
|
|||
|
||||
public JobDefinition GetDefinition(Type type)
|
||||
{
|
||||
return Single(c => c.Type == type.FullName);
|
||||
return Queryable().Single(c => c.TypeName == type.FullName);
|
||||
}
|
||||
|
||||
|
||||
public IList<JobDefinition> GetPendingJobs()
|
||||
{
|
||||
return Where(c => c.Enable && c.LastExecution < DateTime.Now.AddMinutes(-c.Interval)).ToList();
|
||||
return Queryable().Where(c => c.Enable && c.LastExecution < DateTime.Now.AddMinutes(-c.Interval)).ToList();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
|
@ -73,4 +72,4 @@ namespace NzbDrone.Core.Jobs
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue