mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-31 16:02:29 +01:00
24 lines
577 B
C#
24 lines
577 B
C#
using System.Linq;
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
namespace NzbDrone.Core.Indexers
|
|
{
|
|
public interface IIndexerRepository : IBasicRepository<IndexerDefinition>
|
|
{
|
|
IndexerDefinition Get(string name);
|
|
}
|
|
|
|
public class IndexerRepository : BasicRepository<IndexerDefinition>, IIndexerRepository
|
|
{
|
|
public IndexerRepository(IDatabase database)
|
|
: base(database)
|
|
{
|
|
}
|
|
|
|
public IndexerDefinition Get(string name)
|
|
{
|
|
return Query.Single(i => i.Name.ToLower() == name.ToLower());
|
|
}
|
|
}
|
|
}
|