mirror of
https://github.com/Jackett/Jackett
synced 2025-02-23 23:00:51 +00:00
Search all TV categories for the piratebay
This commit is contained in:
parent
9ba12621a5
commit
68dd53b962
1 changed files with 11 additions and 1 deletions
|
@ -45,6 +45,7 @@ namespace Jackett.Indexers
|
|||
|
||||
const string DefaultUrl = "https://thepiratebay.se";
|
||||
const string SearchUrl = "/s/?q=\"{0}\"&category=205&page=0&orderby=99";
|
||||
const string SearchUrl2 = "/s/?q=\"{0}\"&category=208&page=0&orderby=99";
|
||||
const string SwitchSingleViewUrl = "/switchview.php?view=s";
|
||||
|
||||
string BaseUrl;
|
||||
|
@ -111,11 +112,20 @@ namespace Jackett.Indexers
|
|||
{
|
||||
List<ReleaseInfo> releases = new List<ReleaseInfo>();
|
||||
|
||||
List<string> searchUrls = new List<string>();
|
||||
|
||||
foreach (var title in query.ShowTitles ?? new string[] { string.Empty })
|
||||
{
|
||||
var searchString = title + " " + query.GetEpisodeSearchString();
|
||||
var episodeSearchUrl = baseUrl + string.Format(SearchUrl, HttpUtility.UrlEncode(searchString));
|
||||
var queryStr = HttpUtility.UrlEncode(searchString);
|
||||
var episodeSearchUrl = baseUrl + string.Format(SearchUrl, queryStr);
|
||||
var episodeSearchUrl2 = baseUrl + string.Format(SearchUrl2, queryStr);
|
||||
searchUrls.Add(episodeSearchUrl);
|
||||
searchUrls.Add(episodeSearchUrl2);
|
||||
}
|
||||
|
||||
foreach (var episodeSearchUrl in searchUrls)
|
||||
{
|
||||
var message = new HttpRequestMessage
|
||||
{
|
||||
Method = HttpMethod.Get,
|
||||
|
|
Loading…
Reference in a new issue