diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-04-20 18:08:19 +0100 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-04-20 18:08:19 +0100 |
| commit | 7848ea148438baf8929e1c2939e6979cb84aad1a (patch) | |
| tree | 8b5d2d304d5dee03332c7c7fa92ed24280b41a7b | |
| parent | a99caa0daae7c47afdf7d0cf5cf182976211ffa2 (diff) | |
missed one.
| -rw-r--r-- | Emby.Dlna/DlnaManager.cs | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index e80f1aaee..7f8dba35f 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -106,28 +106,19 @@ namespace Emby.Dlna throw new ArgumentNullException(nameof(deviceInfo)); } - try - { - var profile = GetProfiles() - .FirstOrDefault(i => i.Identification != null && IsMatch(deviceInfo, i.Identification)); - - if (profile != null) - { - _logger.LogDebug("Found matching device profile: {ProfileName}", profile.Name); - } - else - { - LogUnmatchedProfile(deviceInfo); - } + var profile = GetProfiles() + .FirstOrDefault(i => i.Identification != null && IsMatch(deviceInfo, i.Identification)); - return profile; + if (profile != null) + { + _logger.LogDebug("Found matching device profile: {ProfileName}", profile.Name); } - catch (ArgumentException ex) + else { - _logger.LogError(ex, "Error in profile comparison."); + LogUnmatchedProfile(deviceInfo); } - return null; + return profile; } private void LogUnmatchedProfile(DeviceIdentification profile) |
