mirror of https://github.com/lidarr/Lidarr
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using NzbDrone.Common.Http;
|
|
using NzbDrone.Core.IndexerSearch.Definitions;
|
|
|
|
namespace NzbDrone.Core.Indexers.Torrentleech
|
|
{
|
|
public class TorrentleechRequestGenerator : IIndexerRequestGenerator
|
|
{
|
|
public TorrentleechSettings Settings { get; set; }
|
|
|
|
public virtual IndexerPageableRequestChain GetRecentRequests()
|
|
{
|
|
var pageableRequests = new IndexerPageableRequestChain();
|
|
|
|
pageableRequests.Add(GetRssRequests(null));
|
|
|
|
return pageableRequests;
|
|
}
|
|
|
|
public virtual IndexerPageableRequestChain GetSearchRequests(AlbumSearchCriteria searchCriteria)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
public virtual IndexerPageableRequestChain GetSearchRequests(ArtistSearchCriteria searchCriteria)
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
private IEnumerable<IndexerRequest> GetRssRequests(string searchParameters)
|
|
{
|
|
yield return new IndexerRequest(string.Format("{0}/{1}{2}", Settings.BaseUrl.Trim().TrimEnd('/'), Settings.ApiKey, searchParameters), HttpAccept.Rss);
|
|
}
|
|
}
|
|
}
|