mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-19 03:10:50 +02:00
New: (Newznab) Parse PosterUrl when available
This commit is contained in:
parent
252b9a1b6b
commit
31886e8d35
2 changed files with 12 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInf
|
|||
releaseInfo.ImdbId = GetImdbId(item);
|
||||
releaseInfo.Grabs = GetGrabs(item);
|
||||
releaseInfo.Files = GetFiles(item);
|
||||
releaseInfo.PosterUrl = GetPosterUrl(item);
|
||||
|
||||
return releaseInfo;
|
||||
}
|
||||
|
|
@ -220,6 +221,11 @@ protected virtual int GetGrabs(XElement item)
|
|||
return 0;
|
||||
}
|
||||
|
||||
protected virtual string GetPosterUrl(XElement item)
|
||||
{
|
||||
return ParseUrl(TryGetNewznabAttribute(item, "coverurl"));
|
||||
}
|
||||
|
||||
protected virtual int GetFiles(XElement item)
|
||||
{
|
||||
var filesString = TryGetNewznabAttribute(item, "files");
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInf
|
|||
}
|
||||
|
||||
torrentInfo.IndexerFlags = GetFlags(item);
|
||||
torrentInfo.PosterUrl = GetPosterUrl(item);
|
||||
}
|
||||
|
||||
return torrentInfo;
|
||||
|
|
@ -133,6 +134,11 @@ protected virtual string GetImdbId(XElement item)
|
|||
return !imdbIdString.IsNullOrWhiteSpace() ? imdbIdString.Substring(2) : null;
|
||||
}
|
||||
|
||||
protected virtual string GetPosterUrl(XElement item)
|
||||
{
|
||||
return ParseUrl(TryGetTorznabAttribute(item, "coverurl"));
|
||||
}
|
||||
|
||||
protected override string GetInfoHash(XElement item)
|
||||
{
|
||||
return TryGetTorznabAttribute(item, "infohash");
|
||||
|
|
|
|||
Loading…
Reference in a new issue