New: Newznab will show indexer name and logo when possible.

This commit is contained in:
Mark McDowall 2012-05-08 14:29:24 -07:00
commit f26ef627df
6 changed files with 14 additions and 3 deletions

View file

@ -85,6 +85,8 @@ namespace NzbDrone.Core.Providers.Indexer
{
if (item.Links.Count > 1)
currentResult.Size = item.Links[1].Length;
currentResult.Indexer = GetName(item);
}
return currentResult;
@ -107,5 +109,11 @@ namespace NzbDrone.Core.Providers.Indexer
return urls.ToArray();
}
private string GetName(SyndicationItem item)
{
var hostname = item.Links[0].Uri.DnsSafeHost.ToLower();
return String.Format("{0}_{1}", Name, hostname);
}
}
}