|
|
|
@ -1,33 +1,20 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Indexers
|
|
|
|
|
{
|
|
|
|
|
public interface IIndexerRepository : IBasicRepository<IndexerDefinition>
|
|
|
|
|
public interface IIndexerRepository : IProviderRepository<IndexerDefinition>
|
|
|
|
|
{
|
|
|
|
|
IndexerDefinition Get(string name);
|
|
|
|
|
IndexerDefinition Find(string name);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class IndexerRepository : BasicRepository<IndexerDefinition>, IIndexerRepository
|
|
|
|
|
public class IndexerRepository : ProviderRepository<IndexerDefinition>, IIndexerRepository
|
|
|
|
|
{
|
|
|
|
|
public IndexerRepository(IDatabase database, IEventAggregator eventAggregator)
|
|
|
|
|
: base(database, eventAggregator)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IndexerDefinition Get(string name)
|
|
|
|
|
{
|
|
|
|
|
return Query.Single(i => i.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IndexerDefinition Find(string name)
|
|
|
|
|
{
|
|
|
|
|
return Query.SingleOrDefault(i => i.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|