mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: (Newznab) Parse PosterUrl when available
This commit is contained in:
@@ -99,6 +99,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||||||
releaseInfo.ImdbId = GetImdbId(item);
|
releaseInfo.ImdbId = GetImdbId(item);
|
||||||
releaseInfo.Grabs = GetGrabs(item);
|
releaseInfo.Grabs = GetGrabs(item);
|
||||||
releaseInfo.Files = GetFiles(item);
|
releaseInfo.Files = GetFiles(item);
|
||||||
|
releaseInfo.PosterUrl = GetPosterUrl(item);
|
||||||
|
|
||||||
return releaseInfo;
|
return releaseInfo;
|
||||||
}
|
}
|
||||||
@@ -220,6 +221,11 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual string GetPosterUrl(XElement item)
|
||||||
|
{
|
||||||
|
return ParseUrl(TryGetNewznabAttribute(item, "coverurl"));
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual int GetFiles(XElement item)
|
protected virtual int GetFiles(XElement item)
|
||||||
{
|
{
|
||||||
var filesString = TryGetNewznabAttribute(item, "files");
|
var filesString = TryGetNewznabAttribute(item, "files");
|
||||||
|
@@ -62,6 +62,7 @@ namespace NzbDrone.Core.Indexers.Torznab
|
|||||||
}
|
}
|
||||||
|
|
||||||
torrentInfo.IndexerFlags = GetFlags(item);
|
torrentInfo.IndexerFlags = GetFlags(item);
|
||||||
|
torrentInfo.PosterUrl = GetPosterUrl(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return torrentInfo;
|
return torrentInfo;
|
||||||
@@ -133,6 +134,11 @@ namespace NzbDrone.Core.Indexers.Torznab
|
|||||||
return !imdbIdString.IsNullOrWhiteSpace() ? imdbIdString.Substring(2) : null;
|
return !imdbIdString.IsNullOrWhiteSpace() ? imdbIdString.Substring(2) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual string GetPosterUrl(XElement item)
|
||||||
|
{
|
||||||
|
return ParseUrl(TryGetTorznabAttribute(item, "coverurl"));
|
||||||
|
}
|
||||||
|
|
||||||
protected override string GetInfoHash(XElement item)
|
protected override string GetInfoHash(XElement item)
|
||||||
{
|
{
|
||||||
return TryGetTorznabAttribute(item, "infohash");
|
return TryGetTorznabAttribute(item, "infohash");
|
||||||
|
Reference in New Issue
Block a user