mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Avoid frequent Exception
This commit is contained in:
parent
894d87fabb
commit
05b53d1f30
@ -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