internal async void Init() { var host = Settings.Host; if (string.IsNullOrWhiteSpace(host)) { host = "nohost"; } var port = (int)Settings.Port; if (port == 0) { port = 80; } if (XBMC != null) { XBMC.Dispose(); } XBMC = new KODIRPC.Client(new ConnectionSettings(host, port, Settings.User, Settings.Password), PlatformServices); ImageManager = PlatformServices.GetImageManager(XBMC, !string.IsNullOrEmpty(Settings.Password)); var t = XBMC.StartNotificationListener(); t.ContinueWith(t2 => { NotificationsEnabled = !t2.IsFaulted; }); Upnp = new UpnpManager(this); }