mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-26 20:11:49 +02:00
Moved indexers to ObjectDb
This commit is contained in:
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());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user