mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 13:57:11 -04:00
Fixed: (BTN) Prevent NullRef when Result.Torrents is null
This commit is contained in:
parent
6b698b33be
commit
376202e2af
2 changed files with 5 additions and 5 deletions
|
@ -56,9 +56,9 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
|
||||||
LimitsDefault = 100,
|
LimitsDefault = 100,
|
||||||
LimitsMax = 1000,
|
LimitsMax = 1000,
|
||||||
TvSearchParams = new List<TvSearchParam>
|
TvSearchParams = new List<TvSearchParam>
|
||||||
{
|
{
|
||||||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.TvdbId, TvSearchParam.RId
|
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.TvdbId, TvSearchParam.RId
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
caps.Categories.AddCategoryMapping("SD", NewznabStandardCategory.TVSD, "SD");
|
caps.Categories.AddCategoryMapping("SD", NewznabStandardCategory.TVSD, "SD");
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
|
||||||
{
|
{
|
||||||
public class BroadcastheNetParser : IParseIndexerResponse
|
public class BroadcastheNetParser : IParseIndexerResponse
|
||||||
{
|
{
|
||||||
private static readonly Regex RegexProtocol = new Regex("^https?:", RegexOptions.Compiled);
|
private static readonly Regex RegexProtocol = new ("^https?:", RegexOptions.Compiled);
|
||||||
|
|
||||||
public Action<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
public Action<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
|
||||||
throw new IndexerException(indexerResponse, "Indexer API call returned an error [{0}]", jsonResponse.Error);
|
throw new IndexerException(indexerResponse, "Indexer API call returned an error [{0}]", jsonResponse.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonResponse.Result.Results == 0)
|
if (jsonResponse.Result.Results == 0 || jsonResponse.Result?.Torrents?.Values == null)
|
||||||
{
|
{
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue