mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
Merge pull request #2031 from softworkz/FixUriException
Avoid frequent Exception
This commit is contained in:
commit
8ac4434d7a
@ -65,12 +65,11 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(address))
|
||||
{
|
||||
try
|
||||
{
|
||||
address = new Uri(address).Host;
|
||||
}
|
||||
catch
|
||||
Uri newUri;
|
||||
|
||||
if (Uri.TryCreate(address, UriKind.Absolute, out newUri))
|
||||
{
|
||||
address = newUri.Host;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user