Skip to content

Commit

Permalink
Added more filtering to ssdp search
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapanila committed May 21, 2017
1 parent 5688c48 commit 7a19380
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SharpCaster/DeviceLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ private async Task<ObservableCollection<Chromecast>> LocateDevicesAsync(SsdpDevi
{
using (deviceLocator)
{
var foundDevices = await deviceLocator.SearchAsync("urn:dial-multiscreen-org:device:dial:1", TimeSpan.FromMilliseconds(5000));

var deviceType = "urn:dial-multiscreen-org:device:dial:1";
deviceLocator.NotificationFilter = deviceType;
var foundDevices = await deviceLocator.SearchAsync(deviceType, TimeSpan.FromMilliseconds(5000));

foreach (var foundDevice in foundDevices)
{
var fullDevice = await foundDevice.GetDeviceInfo();
Expand Down

0 comments on commit 7a19380

Please sign in to comment.