connect updates

This commit is contained in:
Luke Pulverenti
2014-10-26 23:06:01 -04:00
parent b5212f94a9
commit 3ccb6bddef
46 changed files with 292 additions and 88 deletions

View File

@@ -1,4 +1,5 @@
using System;
using MediaBrowser.Model.System;
using System;
using System.Collections.Generic;
namespace MediaBrowser.Model.ApiClient
@@ -19,5 +20,36 @@ namespace MediaBrowser.Model.ApiClient
{
WakeOnLanInfos = new List<WakeOnLanInfo>();
}
public void ImportInfo(PublicSystemInfo systemInfo)
{
Name = systemInfo.ServerName;
Id = systemInfo.Id;
if (!string.IsNullOrEmpty(systemInfo.LocalAddress))
{
LocalAddress = systemInfo.LocalAddress;
}
if (!string.IsNullOrEmpty(systemInfo.WanAddress))
{
RemoteAddress = systemInfo.WanAddress;
}
var fullSystemInfo = systemInfo as SystemInfo;
if (fullSystemInfo != null)
{
WakeOnLanInfos = new List<WakeOnLanInfo>();
if (!string.IsNullOrEmpty(fullSystemInfo.MacAddress))
{
WakeOnLanInfos.Add(new WakeOnLanInfo
{
MacAddress = fullSystemInfo.MacAddress
});
}
}
}
}
}