aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs6
-rw-r--r--MediaBrowser.ServerApplication/ApplicationHost.cs20
2 files changed, 25 insertions, 1 deletions
diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs
index 37aa86047..e605a5daa 100644
--- a/MediaBrowser.Model/System/SystemInfo.cs
+++ b/MediaBrowser.Model/System/SystemInfo.cs
@@ -14,6 +14,12 @@ namespace MediaBrowser.Model.System
public string Version { get; set; }
/// <summary>
+ /// Gets or sets the mac address.
+ /// </summary>
+ /// <value>The mac address.</value>
+ public string MacAddress { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether this instance has pending restart.
/// </summary>
/// <value><c>true</c> if this instance has pending restart; otherwise, <c>false</c>.</value>
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index 3d640190c..2e3037b71 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -582,11 +582,29 @@ namespace MediaBrowser.ServerApplication
InProgressInstallations = InstallationManager.CurrentInstallations.Select(i => i.Item1).ToArray(),
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
Id = _systemId,
- ProgramDataPath = ApplicationPaths.ProgramDataPath
+ ProgramDataPath = ApplicationPaths.ProgramDataPath,
+ MacAddress = GetMacAddress()
};
}
/// <summary>
+ /// Gets the mac address.
+ /// </summary>
+ /// <returns>System.String.</returns>
+ private string GetMacAddress()
+ {
+ try
+ {
+ return NetworkManager.GetMacAddress();
+ }
+ catch (Exception ex)
+ {
+ Logger.ErrorException("Error getting mac address", ex);
+ return null;
+ }
+ }
+
+ /// <summary>
/// Shuts down.
/// </summary>
public override void Shutdown()