mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
More config pages have been added. AJAX to save. Order with jquery sortable.
Some RssFeed Parsing has been implemented, it does not currently download items, still need to perform a more verbose episode check.
This commit is contained in:
42
NzbDrone.Core/Providers/IndexerProvider.cs
Normal file
42
NzbDrone.Core/Providers/IndexerProvider.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user