mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-23 02:05:27 +02:00
27 lines
757 B
C#
27 lines
757 B
C#
using System.Linq;
|
|
using NzbDrone.Core.Datastore;
|
|
using NzbDrone.Core.Messaging.Events;
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
|
namespace NzbDrone.Core.Indexers
|
|
{
|
|
public interface IIndexerStatusRepository : IProviderRepository<IndexerStatus>
|
|
{
|
|
IndexerStatus FindByIndexerId(int indexerId);
|
|
}
|
|
|
|
public class IndexerStatusRepository : ProviderRepository<IndexerStatus>, IIndexerStatusRepository
|
|
{
|
|
public IndexerStatusRepository(IMainDatabase database, IEventAggregator eventAggregator)
|
|
: base(database, eventAggregator)
|
|
{
|
|
}
|
|
|
|
public IndexerStatus FindByIndexerId(int indexerId)
|
|
{
|
|
return Query.Where(c => c.IndexerId == indexerId).SingleOrDefault();
|
|
}
|
|
}
|
|
}
|