浏览代码

Update DlnaManager.cs

BaronGreenback 4 年之前
父节点
当前提交
b673f5bcde
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Emby.Dlna/DlnaManager.cs

+ 8 - 0
Emby.Dlna/DlnaManager.cs

@@ -140,6 +140,14 @@ namespace Emby.Dlna
 
 
         private bool IsMatch(DeviceIdentification deviceInfo, DeviceIdentification profileInfo)
         private bool IsMatch(DeviceIdentification deviceInfo, DeviceIdentification profileInfo)
         {
         {
+            if (!string.IsNullOrEmpty(profileInfo.FriendlyName))
+            {
+                if (deviceInfo.FriendlyName == null || !IsRegexMatch(deviceInfo.FriendlyName, profileInfo.FriendlyName))
+                {
+                    return false;
+                }
+            }
+            
             if (!string.IsNullOrEmpty(profileInfo.Manufacturer))
             if (!string.IsNullOrEmpty(profileInfo.Manufacturer))
             {
             {
                 if (deviceInfo.Manufacturer == null || !IsRegexMatch(deviceInfo.Manufacturer, profileInfo.Manufacturer))
                 if (deviceInfo.Manufacturer == null || !IsRegexMatch(deviceInfo.Manufacturer, profileInfo.Manufacturer))