mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07: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:
parent
65ecd58111
commit
da979639ba
145 changed files with 8384 additions and 113 deletions
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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue