mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Fixed: Trim spaces and empty values in Proxy Bypass List
(cherry picked from commit 846333ddf0d9da775c80d004fdb9b41e700ef359) Closes #5044 Closes #5045
This commit is contained in:
parent
df09e903d4
commit
7555141961
1 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
|
|
||||||
namespace NzbDrone.Common.Http.Proxy
|
namespace NzbDrone.Common.Http.Proxy
|
||||||
|
@ -29,7 +30,8 @@ namespace NzbDrone.Common.Http.Proxy
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(BypassFilter))
|
if (!string.IsNullOrWhiteSpace(BypassFilter))
|
||||||
{
|
{
|
||||||
var hostlist = BypassFilter.Split(',');
|
var hostlist = BypassFilter.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
|
||||||
|
|
||||||
for (var i = 0; i < hostlist.Length; i++)
|
for (var i = 0; i < hostlist.Length; i++)
|
||||||
{
|
{
|
||||||
if (hostlist[i].StartsWith("*"))
|
if (hostlist[i].StartsWith("*"))
|
||||||
|
@ -41,7 +43,7 @@ namespace NzbDrone.Common.Http.Proxy
|
||||||
return hostlist;
|
return hostlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
return System.Array.Empty<string>();
|
return Array.Empty<string>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue