mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-24 22:55:21 -04:00
Fixed: (Apps) Ensure populated capabilities for Torznab/Newznab definitions
This commit is contained in:
@@ -45,14 +45,12 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||
|
||||
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 TorznabSettings GetDefaultBaseUrl(TorznabSettings settings)
|
||||
@@ -64,7 +62,7 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||
{
|
||||
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