gazelletracker: add PosterUrl for desitorrents (#11921)

This commit is contained in:
ilike2burnthing 2021-06-15 16:52:08 +01:00 committed by GitHub
parent e347d38fc0
commit 494331b5fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -26,6 +26,7 @@ namespace Jackett.Common.Indexers.Abstract
protected virtual string APIUrl => SiteLink + "ajax.php";
protected virtual string DownloadUrl => SiteLink + "torrents.php?action=download&usetoken=" + (useTokens ? "1" : "0") + (usePassKey ? "&torrent_pass=" + configData.PassKey.Value : "") + "&id=";
protected virtual string DetailsUrl => SiteLink + "torrents.php?torrentid=";
protected virtual string PosterUrl => SiteLink;
protected virtual string AuthorizationFormat => "{0}";
protected virtual int ApiKeyLength => 41;
@ -228,8 +229,8 @@ namespace Jackett.Common.Indexers.Abstract
? "Tags: " + string.Join(", ", tags) + "\n"
: null;
Uri poster = null;
if (!string.IsNullOrEmpty(cover) && cover.StartsWith("http"))
poster = new Uri(cover);
if (!string.IsNullOrEmpty(cover))
poster = (cover.StartsWith("http")) ? new Uri(cover) : new Uri(PosterUrl + cover);
var release = new ReleaseInfo
{
PublishDate = groupTime,

View File

@ -13,6 +13,7 @@ namespace Jackett.Common.Indexers
[ExcludeFromCodeCoverage]
public class DesiTorrents : GazelleTracker
{
protected override string PosterUrl => SiteLink + "static/media/posters/";
public DesiTorrents(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps,
ICacheService cs)
: base(id: "desitorrents",