Browse Source

restore property values

Luke Pulverenti 11 years ago
parent
commit
27b792afb8
1 changed files with 18 additions and 1 deletions
  1. 18 1
      MediaBrowser.Dlna/PlayTo/DeviceInfo.cs

+ 18 - 1
MediaBrowser.Dlna/PlayTo/DeviceInfo.cs

@@ -4,13 +4,30 @@ namespace MediaBrowser.Dlna.PlayTo
 {
     public class DeviceInfo
     {
+        public DeviceInfo()
+        {
+            ClientType = "DLNA";
+            Name = "Generic Device";
+        }
+
         public string UUID { get; set; }
 
         public string Name { get; set; }
 
         public string ClientType { get; set; }
 
-        public string DisplayName { get; set; }
+        private string _displayName = string.Empty;
+        public string DisplayName
+        {
+            get
+            {
+                return string.IsNullOrEmpty(_displayName) ? Name : _displayName;
+            }
+            set
+            {
+                _displayName = value;
+            }
+        }
 
         public string ModelName { get; set; }