newpct: build torrent link. resolves #1282

This commit is contained in:
Garfield69 2021-10-16 13:05:17 +13:00
parent e9bc740cb6
commit c8a3502f10
1 changed files with 10 additions and 1 deletions

View File

@ -210,7 +210,16 @@ namespace Jackett.Common.Indexers
else
linkText = match.Groups[1].Value;
return new Uri(new Uri(baseLink), linkText);
// take the details page link and the download page link and build a Torrent link
// Details page: https://atomixhq.com/descargar/torrent/peliculas-x264-mkv/el-viaje-i-onde-dager--2021-/bluray-microhd/
// Download page: https://atomtt.com/download/159843_-1634325135-El-viaje--I-onde-dager---2021---BluRay-MicroHD/
// Torrent link: https://atomixhq.com/download/159843_-1634325135-El-viaje--I-onde-dager---2021---BluRay-MicroHD.torrent
linkText = linkText.Remove(linkText.Length - 1, 1) + ".torrent";
var linkHost = new Uri(linkText).Host;
var linkBase = new Uri(baseLink).Host;
var downloadLink = linkText.Replace(linkHost.ToString(), linkBase.ToString());
return new Uri(downloadLink);
}
}