Fixes the PlayTo Profile detection

This commit is contained in:
7illusions 2014-03-12 14:08:24 +01:00
parent a5b807e433
commit 24cdfddc4f

View File

@ -1,4 +1,5 @@
using System; using System;
using System.Text.RegularExpressions;
namespace MediaBrowser.Dlna.PlayTo.Configuration namespace MediaBrowser.Dlna.PlayTo.Configuration
{ {
@ -19,6 +20,8 @@ namespace MediaBrowser.Dlna.PlayTo.Configuration
/// The target container. /// The target container.
/// </value> /// </value>
public string TargetContainer { get; set; } public string TargetContainer { get; set; }
public string MimeType { get; set; }
/// <summary> /// <summary>
/// The default transcoding settings /// The default transcoding settings
@ -46,19 +49,19 @@ namespace MediaBrowser.Dlna.PlayTo.Configuration
{ {
if (!string.IsNullOrEmpty(profile.FriendlyName)) if (!string.IsNullOrEmpty(profile.FriendlyName))
{ {
if (!string.Equals(deviceProperties.Name, profile.FriendlyName, StringComparison.OrdinalIgnoreCase)) if (!Regex.IsMatch(deviceProperties.Name, profile.FriendlyName))
continue; continue;
} }
if (!string.IsNullOrEmpty(profile.ModelNumber)) if (!string.IsNullOrEmpty(profile.ModelNumber))
{ {
if (!string.Equals(deviceProperties.ModelNumber, profile.ModelNumber, StringComparison.OrdinalIgnoreCase)) if (!Regex.IsMatch(deviceProperties.ModelNumber, profile.ModelNumber))
continue; continue;
} }
if (!string.IsNullOrEmpty(profile.ModelName)) if (!string.IsNullOrEmpty(profile.ModelName))
{ {
if (!string.Equals(deviceProperties.ModelName, profile.ModelName, StringComparison.OrdinalIgnoreCase)) if (!Regex.IsMatch(deviceProperties.ModelName, profile.ModelName))
continue; continue;
} }