ahd: fixed an issue caused by invalid uri (#9871) resolves #9861

This commit is contained in:
seeyabye 2020-10-17 09:37:55 +09:00 committed by GitHub
parent edc09fd213
commit 2dda2d47df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -171,9 +171,11 @@ namespace Jackett.Common.Indexers
if (!isAudio) // audio tracks don't have banner either description
{
// small cover only for movies
if (!isSerie && !string.IsNullOrWhiteSpace(torrent.Element("smallcover")?.Value))
var smallCover = torrent.Element("smallcover");
var normalCover = torrent.Element("cover");
if (!isSerie && !string.IsNullOrWhiteSpace(smallCover?.Value) && smallCover.Value.StartsWith("https://"))
banner = new Uri(torrent.FirstValue("smallcover"));
else if (!string.IsNullOrWhiteSpace(torrent.Element("cover")?.Value))
else if (!string.IsNullOrWhiteSpace(normalCover?.Value) && normalCover.Value.StartsWith("https://"))
banner = new Uri(torrent.FirstValue("cover"));
description = torrent.Element("encodestatus") != null ?