1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

New: Added support for newznab indexers using tvdbid for searching.

This commit is contained in:
Taloth Saldono
2015-09-26 10:45:13 +02:00
parent 7af7c2003e
commit 99f452e299
34 changed files with 489 additions and 642 deletions
@@ -44,6 +44,7 @@ namespace NzbDrone.Core.Indexers.Newznab
{
releaseInfo = base.ProcessItem(item, releaseInfo);
releaseInfo.TvdbId = GetTvdbId(item);
releaseInfo.TvRageId = GetTvRageId(item);
return releaseInfo;
@@ -97,6 +98,19 @@ namespace NzbDrone.Core.Indexers.Newznab
return url;
}
protected virtual int GetTvdbId(XElement item)
{
var tvdbIdString = TryGetNewznabAttribute(item, "tvdbid");
int tvdbId;
if (!tvdbIdString.IsNullOrWhiteSpace() && int.TryParse(tvdbIdString, out tvdbId))
{
return tvdbId;
}
return 0;
}
protected virtual int GetTvRageId(XElement item)
{
var tvRageIdString = TryGetNewznabAttribute(item, "rageid");