|
|
@ -106,8 +106,6 @@ namespace Emby.Server.Implementations.EntryPoints
|
|
|
|
NatUtility.StartDiscovery();
|
|
|
|
NatUtility.StartDiscovery();
|
|
|
|
|
|
|
|
|
|
|
|
_timer = new Timer((_) => _createdRules.Clear(), null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10));
|
|
|
|
_timer = new Timer((_) => _createdRules.Clear(), null, TimeSpan.FromMinutes(10), TimeSpan.FromMinutes(10));
|
|
|
|
|
|
|
|
|
|
|
|
_deviceDiscovery.DeviceDiscovered += OnDeviceDiscoveryDeviceDiscovered;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void Stop()
|
|
|
|
private void Stop()
|
|
|
@ -118,13 +116,6 @@ namespace Emby.Server.Implementations.EntryPoints
|
|
|
|
NatUtility.DeviceFound -= OnNatUtilityDeviceFound;
|
|
|
|
NatUtility.DeviceFound -= OnNatUtilityDeviceFound;
|
|
|
|
|
|
|
|
|
|
|
|
_timer?.Dispose();
|
|
|
|
_timer?.Dispose();
|
|
|
|
|
|
|
|
|
|
|
|
_deviceDiscovery.DeviceDiscovered -= OnDeviceDiscoveryDeviceDiscovered;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void OnDeviceDiscoveryDeviceDiscovered(object sender, GenericEventArgs<UpnpDeviceInfo> e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
NatUtility.Search(e.Argument.LocalIpAddress, NatProtocol.Upnp);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async void OnNatUtilityDeviceFound(object sender, DeviceEventArgs e)
|
|
|
|
private async void OnNatUtilityDeviceFound(object sender, DeviceEventArgs e)
|
|
|
|