mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-19 22:04:56 -04:00
Fixed: (Apps) Ensure populated capabilities for Torznab/Newznab definitions
This commit is contained in:
@@ -43,14 +43,12 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
|
||||
public string[] GetBaseUrlFromSettings()
|
||||
{
|
||||
var baseUrl = "";
|
||||
|
||||
if (Definition == null || Settings == null || Settings.Categories == null)
|
||||
if (Definition == null || Settings?.Categories == null)
|
||||
{
|
||||
return new string[] { baseUrl };
|
||||
return new[] { "" };
|
||||
}
|
||||
|
||||
return new string[] { Settings.BaseUrl };
|
||||
return new[] { Settings.BaseUrl };
|
||||
}
|
||||
|
||||
protected override NewznabSettings GetDefaultBaseUrl(NewznabSettings settings)
|
||||
@@ -62,7 +60,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
{
|
||||
var caps = new IndexerCapabilities();
|
||||
|
||||
if (Definition == null || Settings == null || Settings.Categories == null)
|
||||
if (Definition == null || Settings?.Categories == null)
|
||||
{
|
||||
return caps;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user