diff --git a/src/Jackett.Common/Indexers/Cinecalidad.cs b/src/Jackett.Common/Indexers/Cinecalidad.cs index e4e970c65..092bb0aea 100644 --- a/src/Jackett.Common/Indexers/Cinecalidad.cs +++ b/src/Jackett.Common/Indexers/Cinecalidad.cs @@ -142,8 +142,7 @@ namespace Jackett.Common.Indexers var linkParts = protectedLink.Split('='); protectedLink = protectedLink.Replace(linkParts[0] + "=", ""); } - if (protectedLink.StartsWith("/")) - protectedLink = SiteLink + protectedLink.TrimStart('/'); + protectedLink = GetAbsoluteUrl(protectedLink); results = await RequestWithCookiesAsync(protectedLink); dom = parser.ParseDocument(results.ContentString); @@ -179,8 +178,8 @@ namespace Jackett.Common.Indexers title += _language.Equals("castellano") ? " MULTi/SPANiSH" : " MULTi/LATiN SPANiSH"; title += " 1080p BDRip x264"; - var poster = new Uri(qImg.GetAttribute("src")); - var link = new Uri(row.QuerySelector("a").GetAttribute("href")); + var poster = new Uri(GetAbsoluteUrl(qImg.GetAttribute("src"))); + var link = new Uri(GetAbsoluteUrl(row.QuerySelector("a").GetAttribute("href"))); var release = new ReleaseInfo { @@ -226,6 +225,14 @@ namespace Jackett.Common.Indexers return queryWords.All(word => titleWords.Contains(word)); } + + private string GetAbsoluteUrl(string url) + { + url = url.Trim(); + if (!url.StartsWith("http")) + return SiteLink + url.TrimStart('/'); + return url; + } } }