소스 검색

handle missing client type

Luke Pulverenti 11 년 전
부모
커밋
2c7aaa5293
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      MediaBrowser.Dlna/PlayTo/PlayToManager.cs

+ 8 - 2
MediaBrowser.Dlna/PlayTo/PlayToManager.cs

@@ -244,8 +244,14 @@ namespace MediaBrowser.Dlna.PlayTo
             var profile = _dlnaManager.GetProfile(deviceProperties.DisplayName, deviceProperties.ModelName,
                 deviceProperties.ModelNumber);
 
-            deviceProperties.DisplayName = profile.Name;
-            deviceProperties.ClientType = profile.ClientType;
+            if (!string.IsNullOrWhiteSpace(profile.Name))
+            {
+                deviceProperties.DisplayName = profile.Name;
+            }
+            if (!string.IsNullOrWhiteSpace(profile.ClientType))
+            {
+                deviceProperties.ClientType = profile.ClientType;
+            }
         }
 
         /// <summary>