mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
rewrite of indexer/episode search
This commit is contained in:
parent
9ae21cf7a1
commit
a6a4932b44
114 changed files with 2045 additions and 5577 deletions
|
@ -1,25 +1,23 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public interface IIndexerRepository : IBasicRepository<Indexer>
|
||||
public interface IIndexerRepository : IBasicRepository<IndexerDefinition>
|
||||
{
|
||||
Indexer Find(Type type);
|
||||
IndexerDefinition Get(string name);
|
||||
}
|
||||
|
||||
public class IndexerRepository : BasicRepository<Indexer>, IIndexerRepository
|
||||
public class IndexerRepository : BasicRepository<IndexerDefinition>, IIndexerRepository
|
||||
{
|
||||
public IndexerRepository(IDatabase database)
|
||||
: base(database)
|
||||
{
|
||||
}
|
||||
|
||||
public Indexer Find(Type type)
|
||||
public IndexerDefinition Get(string name)
|
||||
{
|
||||
return Query.Single(i => i.Type == type.ToString());
|
||||
return Query.Single(i => i.Name.ToLower() == name.ToLower());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue