mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-27 18:17:13 +00:00
da979639ba
Some RssFeed Parsing has been implemented, it does not currently download items, still need to perform a more verbose episode check.
42 lines
1 KiB
C#
42 lines
1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using NLog;
|
|
using NzbDrone.Core.Model;
|
|
using SubSonic.Repository;
|
|
using NzbDrone.Core.Repository;
|
|
|
|
namespace NzbDrone.Core.Providers
|
|
{
|
|
public class IndexerProvider : IIndexerProvider
|
|
{
|
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
|
private readonly IRepository _sonicRepo;
|
|
|
|
public IndexerProvider(IRepository sonicRepo)
|
|
{
|
|
_sonicRepo = sonicRepo;
|
|
}
|
|
|
|
#region IIndexerProvider
|
|
|
|
public List<Indexer> AllIndexers()
|
|
{
|
|
return _sonicRepo.All<Indexer>().OrderBy(i => i.Order).ToList();
|
|
}
|
|
|
|
public List<Indexer> EnabledIndexers()
|
|
{
|
|
return _sonicRepo.All<Indexer>().Where(i => i.Enabled).OrderBy(i => i.Order).ToList();
|
|
}
|
|
|
|
public void Update(Indexer indexer)
|
|
{
|
|
_sonicRepo.Update(indexer);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|