mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Moved indexers to ObjectDb
This commit is contained in:
parent
d373a07edc
commit
43a7d6239e
36 changed files with 238 additions and 227 deletions
27
NzbDrone.Core/Indexers/IndexerRepository.cs
Normal file
27
NzbDrone.Core/Indexers/IndexerRepository.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public interface IIndexerRepository : IBasicRepository<Indexer>
|
||||
{
|
||||
Indexer Find(Type type);
|
||||
}
|
||||
|
||||
public class IndexerRepository : BasicRepository<Indexer>, IIndexerRepository
|
||||
{
|
||||
public IndexerRepository(IObjectDatabase objectDatabase)
|
||||
: base(objectDatabase)
|
||||
{
|
||||
}
|
||||
|
||||
public Indexer Find(Type type)
|
||||
{
|
||||
return Queryable.Single(i => i.Type == type.ToString());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue