mirror of https://github.com/Jackett/Jackett
cinecalidad: fix keywordless search
sometimes the films are not of the first recent page this fix ensures the first 3 pages are checked
This commit is contained in:
parent
6e7ce9c8a8
commit
27cc8ff63f
|
@ -20,7 +20,7 @@ namespace Jackett.Common.Indexers
|
||||||
[ExcludeFromCodeCoverage]
|
[ExcludeFromCodeCoverage]
|
||||||
public class Cinecalidad : BaseWebIndexer
|
public class Cinecalidad : BaseWebIndexer
|
||||||
{
|
{
|
||||||
private const int MaxLatestPageLimit = 3; // 10 items per page * 3 pages = 30
|
private const int MaxLatestPageLimit = 3; // 12 items per page * 3 pages = 36
|
||||||
private const int MaxSearchPageLimit = 6;
|
private const int MaxSearchPageLimit = 6;
|
||||||
|
|
||||||
public override string[] LegacySiteLinks { get; protected set; } = {
|
public override string[] LegacySiteLinks { get; protected set; } = {
|
||||||
|
@ -78,8 +78,9 @@ namespace Jackett.Common.Indexers
|
||||||
var templateUrl = SiteLink;
|
var templateUrl = SiteLink;
|
||||||
templateUrl += "{0}?s="; // placeholder for page
|
templateUrl += "{0}?s="; // placeholder for page
|
||||||
|
|
||||||
var maxPages = MaxLatestPageLimit; // we scrape only 2 pages for recent torrents
|
var maxPages = MaxLatestPageLimit; // we scrape only 3 pages for recent torrents
|
||||||
if (!string.IsNullOrWhiteSpace(query.GetQueryString()))
|
var recent = !string.IsNullOrWhiteSpace(query.GetQueryString());
|
||||||
|
if (recent)
|
||||||
{
|
{
|
||||||
templateUrl += WebUtilityHelpers.UrlEncode(query.GetQueryString(), Encoding.UTF8);
|
templateUrl += WebUtilityHelpers.UrlEncode(query.GetQueryString(), Encoding.UTF8);
|
||||||
maxPages = MaxSearchPageLimit;
|
maxPages = MaxSearchPageLimit;
|
||||||
|
@ -101,7 +102,7 @@ namespace Jackett.Common.Indexers
|
||||||
}
|
}
|
||||||
releases.AddRange(pageReleases);
|
releases.AddRange(pageReleases);
|
||||||
|
|
||||||
if (pageReleases.Count < 1)
|
if (pageReleases.Count < 1 && recent)
|
||||||
break; // this is the last page
|
break; // this is the last page
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ namespace Jackett.Common.Indexers
|
||||||
continue; // we only support movies
|
continue; // we only support movies
|
||||||
|
|
||||||
var qLink = row.QuerySelector("a.absolute");
|
var qLink = row.QuerySelector("a.absolute");
|
||||||
var qImg = row.QuerySelector("img");
|
var qImg = row.QuerySelector("img.rounded");
|
||||||
if (qLink == null || qImg == null)
|
if (qLink == null || qImg == null)
|
||||||
continue; // skip results without image
|
continue; // skip results without image
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue