1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Add rss sync to awesome-hd

This commit is contained in:
Devin Buhl 2017-01-13 21:55:07 -05:00
parent 29586667cb
commit dd5049b483
2 changed files with 11 additions and 4 deletions

View File

@ -9,7 +9,7 @@ public class AwesomeHD : HttpIndexerBase<AwesomeHDSettings>
{
public override string Name => "AwesomeHD";
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
public override bool SupportsRss => false;
public override bool SupportsRss => true;
public override bool SupportsSearch => true;
public override int PageSize => 50;

View File

@ -15,7 +15,7 @@ public virtual IndexerPageableRequestChain GetRecentRequests()
{
var pageableRequests = new IndexerPageableRequestChain();
pageableRequests.Add(GetRequest("tt2488496"));
pageableRequests.Add(GetRequest(null));
return pageableRequests;
}
@ -54,8 +54,15 @@ public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchC
private IEnumerable<IndexerRequest> GetRequest(string searchParameters)
{
var request = new IndexerRequest(string.Format("{0}/searchapi.php?action=imdbsearch&passkey={1}&imdb={2}", Settings.BaseUrl.Trim().TrimEnd('/'), Settings.Passkey.Trim(), searchParameters), HttpAccept.Rss);
yield return request;
if (searchParameters != null)
{
yield return new IndexerRequest(string.Format("{0}/searchapi.php?action=imdbsearch&passkey={1}&imdb={2}", Settings.BaseUrl.Trim().TrimEnd('/'), Settings.Passkey.Trim(), searchParameters), HttpAccept.Rss);
}
else
{
yield return new IndexerRequest(string.Format("{0}/searchapi.php?action=latestmovies&passkey={1}", Settings.BaseUrl.Trim().TrimEnd('/'), Settings.Passkey.Trim()), HttpAccept.Rss);
}
}
}
}