mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Newpct - Legacy site links (#4319)
* btdb.to domain gone. using proxy https://btdb.unblocked.app/ until we're sure its not comming back. * katcrs: new domain plus followredirect * gktorrent: forcing https * - Allow download from mirrors (#4298) * HDTorrent.it (#4310) Update regex to handle better seasons and multiple episode Freelech torrent support Minor fix * IPTorrents: fix error handling * RoDVD: update URL * Torrent9 clone (torrents9.pw): update URL * TorrentCCF: update URL * LegacySiteLinks added
This commit is contained in:
@@ -46,7 +46,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
|||||||
* LimeTorrents
|
* LimeTorrents
|
||||||
* MagnetDL
|
* MagnetDL
|
||||||
* MejorTorrent <!-- maintained by ivandelabeldad -->
|
* MejorTorrent <!-- maintained by ivandelabeldad -->
|
||||||
* Newpct (aka: tvsinpagar, descargas2020, torrentlocura, torrentrapid, tumejortorrent, etc)
|
* Newpct (aka: tvsinpagar, descargas2020, torrentlocura, torrentrapid, tumejortorrent, pctnew, etc)
|
||||||
* Nyaa.si
|
* Nyaa.si
|
||||||
* Nyaa-Pantsu
|
* Nyaa-Pantsu
|
||||||
* Nyoo
|
* Nyoo
|
||||||
|
@@ -56,13 +56,20 @@ namespace Jackett.Common.Indexers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Uri[] SiteLinkUris = new Uri[]
|
private static Uri DefaultSiteLinkUri =
|
||||||
|
new Uri("http://descargas2020.com/");
|
||||||
|
|
||||||
|
private static Uri[] ExtraSiteLinkUris = new Uri[]
|
||||||
{
|
{
|
||||||
new Uri("http://descargas2020.com/"),
|
new Uri("http://torrentrapid.com/"),
|
||||||
new Uri("http://torrentrapid.com/"),
|
new Uri("http://torrentlocura.com/"),
|
||||||
new Uri("http://torrentlocura.com/"),
|
new Uri("http://tumejortorrent.com/"),
|
||||||
new Uri("http://tumejortorrent.com/"),
|
new Uri("http://pctnew.com/"),
|
||||||
new Uri("http://www.tvsinpagar.com/"),
|
};
|
||||||
|
|
||||||
|
private static Uri[] LegacySiteLinkUris = new Uri[]
|
||||||
|
{
|
||||||
|
new Uri("http://www.tvsinpagar.com/"),
|
||||||
};
|
};
|
||||||
|
|
||||||
private NewpctRelease _mostRecentRelease;
|
private NewpctRelease _mostRecentRelease;
|
||||||
@@ -91,10 +98,12 @@ namespace Jackett.Common.Indexers
|
|||||||
private string _seriesUrl = "{0}/pg/{1}";
|
private string _seriesUrl = "{0}/pg/{1}";
|
||||||
private string[] _voUrls = new string[] { "serie-vo", "serievo" };
|
private string[] _voUrls = new string[] { "serie-vo", "serievo" };
|
||||||
|
|
||||||
|
public override string[] LegacySiteLinks { get; protected set; } = LegacySiteLinkUris.Select(u => u.AbsoluteUri).ToArray();
|
||||||
|
|
||||||
public Newpct(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
public Newpct(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
||||||
: base(name: "Newpct",
|
: base(name: "Newpct",
|
||||||
description: "Newpct - descargar torrent peliculas, series",
|
description: "Newpct - descargar torrent peliculas, series",
|
||||||
link: SiteLinkUris[0].AbsoluteUri,
|
link: DefaultSiteLinkUri.AbsoluteUri,
|
||||||
caps: new TorznabCapabilities(TorznabCatType.TV,
|
caps: new TorznabCapabilities(TorznabCatType.TV,
|
||||||
TorznabCatType.TVSD,
|
TorznabCatType.TVSD,
|
||||||
TorznabCatType.TVHD,
|
TorznabCatType.TVHD,
|
||||||
@@ -146,15 +155,18 @@ namespace Jackett.Common.Indexers
|
|||||||
List<string> links = new List<string>();
|
List<string> links = new List<string>();
|
||||||
links.Add(linkParam.AbsoluteUri);
|
links.Add(linkParam.AbsoluteUri);
|
||||||
|
|
||||||
foreach (Uri extraSiteUri in SiteLinkUris)
|
IEnumerable<Uri> knownUris = (new Uri[] { DefaultSiteLinkUri }).
|
||||||
|
Concat(ExtraSiteLinkUris).Concat(LegacySiteLinkUris);
|
||||||
|
|
||||||
|
foreach (Uri extraSiteUri in knownUris)
|
||||||
{
|
{
|
||||||
UriBuilder ub = new UriBuilder(linkParam);
|
UriBuilder ub = new UriBuilder(linkParam);
|
||||||
ub.Host = extraSiteUri.Host;
|
ub.Host = extraSiteUri.Host;
|
||||||
links.Add(ub.Uri.AbsoluteUri);
|
string link = ub.Uri.AbsoluteUri;
|
||||||
|
if (link != linkParam.AbsoluteUri)
|
||||||
|
links.Add(ub.Uri.AbsoluteUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
links = links.Distinct().ToList();
|
|
||||||
|
|
||||||
foreach (string link in links)
|
foreach (string link in links)
|
||||||
{
|
{
|
||||||
byte[] result = null;
|
byte[] result = null;
|
||||||
|
Reference in New Issue
Block a user