|
|
@ -30,6 +30,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|
|
|
public NewznabCapabilities GetCapabilities(NewznabSettings indexerSettings)
|
|
|
|
public NewznabCapabilities GetCapabilities(NewznabSettings indexerSettings)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var key = indexerSettings.ToJson();
|
|
|
|
var key = indexerSettings.ToJson();
|
|
|
|
|
|
|
|
_capabilitiesCache.Clear();
|
|
|
|
var capabilities = _capabilitiesCache.Get(key, () => FetchCapabilities(indexerSettings), TimeSpan.FromDays(7));
|
|
|
|
var capabilities = _capabilitiesCache.Get(key, () => FetchCapabilities(indexerSettings), TimeSpan.FromDays(7));
|
|
|
|
|
|
|
|
|
|
|
|
return capabilities;
|
|
|
|
return capabilities;
|
|
|
@ -98,6 +99,16 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|
|
|
capabilities.SupportedTvSearchParameters = xmlTvSearch.Attribute("supportedParams").Value.Split(',');
|
|
|
|
capabilities.SupportedTvSearchParameters = xmlTvSearch.Attribute("supportedParams").Value.Split(',');
|
|
|
|
capabilities.SupportsAggregateIdSearch = true;
|
|
|
|
capabilities.SupportsAggregateIdSearch = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var xmlMovieSearch = xmlSearching.Element("movie-search");
|
|
|
|
|
|
|
|
if (xmlMovieSearch == null || xmlMovieSearch.Attribute("available").Value != "yes")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
capabilities.SupportedMovieSearchParamters = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (xmlMovieSearch.Attribute("supportedParams") != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
capabilities.SupportedMovieSearchParamters = xmlMovieSearch.Attribute("supportedParams").Value.Split(',');
|
|
|
|
|
|
|
|
capabilities.SupportsAggregateIdSearch = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var xmlCategories = xmlRoot.Element("categories");
|
|
|
|
var xmlCategories = xmlRoot.Element("categories");
|
|
|
|