diff --git a/Sharpcaster/ChromecastLocator.cs b/Sharpcaster/ChromecastLocator.cs index 53c77b1..ea2b3c4 100644 --- a/Sharpcaster/ChromecastLocator.cs +++ b/Sharpcaster/ChromecastLocator.cs @@ -48,7 +48,9 @@ private void OnServiceAdded(object sender, ServiceAnnouncementEventArgs e) .ToDictionary(y => y[0], y => y[1]); if (!txtValues.ContainsKey("fn")) return; var ip = e.Announcement.Addresses[0]; - Uri.TryCreate("https://" + ip, UriKind.Absolute, out Uri myUri); + var uriBuilder = new UriBuilder("https", ip.ToString()); + Uri myUri = uriBuilder.Uri; + var chromecast = new ChromecastReceiver { DeviceUri = myUri,