update panasonic profile

pull/702/head
Luke Pulverenti 11 years ago
parent f3e992b82b
commit e0c60dc29a

@ -57,6 +57,7 @@ namespace MediaBrowser.Controller.Dlna
Width, Width,
Height, Height,
Has64BitOffsets, Has64BitOffsets,
VideoBitDepth,
VideoBitrate, VideoBitrate,
VideoFramerate, VideoFramerate,
VideoLevel, VideoLevel,

@ -5,7 +5,7 @@ namespace MediaBrowser.Controller.Dlna
{ {
public class DirectPlayProfile public class DirectPlayProfile
{ {
public string[] Containers { get; set; } public string Container { get; set; }
public string AudioCodec { get; set; } public string AudioCodec { get; set; }
public string VideoCodec { get; set; } public string VideoCodec { get; set; }
@ -16,8 +16,11 @@ namespace MediaBrowser.Controller.Dlna
public DirectPlayProfile() public DirectPlayProfile()
{ {
Conditions = new List<ProfileCondition>(); Conditions = new List<ProfileCondition>();
}
Containers = new string[] { }; public List<string> GetContainers()
{
return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
} }
public List<string> GetAudioCodecs() public List<string> GetAudioCodecs()

@ -56,22 +56,22 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
Type = DlnaProfileType.Audio, Type = DlnaProfileType.Audio,
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mkv",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4"}, Container = "mp4",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
}, },
@ -123,22 +123,22 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mkv",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4"}, Container = "mp4",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
}, },
@ -190,22 +190,22 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mkv",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4"}, Container = "mp4",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
}, },
@ -290,21 +290,21 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
VideoCodec = "mpeg4", VideoCodec = "mpeg4",
AudioCodec = "ac3,mp3", AudioCodec = "ac3,mp3",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
VideoCodec = "h264", VideoCodec = "h264",
AudioCodec = "aac", AudioCodec = "aac",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4", "mov"}, Container = "mp4,mov",
VideoCodec = "h264,mpeg4", VideoCodec = "h264,mpeg4",
AudioCodec = "aac,ac3", AudioCodec = "aac,ac3",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
@ -316,26 +316,26 @@ namespace MediaBrowser.Dlna
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"asf"}, Container = "asf",
VideoCodec = "wmv2,wmv3,vc1", VideoCodec = "wmv2,wmv3,vc1",
AudioCodec = "wmav2,wmapro", AudioCodec = "wmav2,wmapro",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"asf"}, Container = "asf",
AudioCodec = "wmav2,wmapro,wmavoice", AudioCodec = "wmav2,wmapro,wmavoice",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
AudioCodec = "mp3", AudioCodec = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"jpeg"}, Container = "jpeg",
Type = DlnaProfileType.Photo, Type = DlnaProfileType.Photo,
Conditions = new List<ProfileCondition> Conditions = new List<ProfileCondition>
@ -449,12 +449,12 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
}, },
@ -498,17 +498,17 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"asf"}, Container = "asf",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
} }
}, },
@ -559,22 +559,22 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"wma"}, Container = "wma",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4"}, Container = "mp4",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
}, },
@ -613,27 +613,41 @@ namespace MediaBrowser.Dlna
list.Add(new DeviceProfile list.Add(new DeviceProfile
{ {
//Panasonic Viera (2011|2012) Without AVI Support Name = "Panasonic Viera",
Name = "Panasonic Viera E/S/ST/VT (2011)",
ClientType = "DLNA", ClientType = "DLNA",
Identification = new DeviceIdentification Identification = new DeviceIdentification
{ {
FriendlyName = @"(VIERA (E|S)T?(3|5)0?.*)|(VIERA VT30.*)", FriendlyName = @"VIERA",
Manufacturer = "Panasonic" Manufacturer = "Panasonic",
Headers = new List<HttpHeaderInfo>
{
new HttpHeaderInfo{ Name= "User-Agent", Value = "Panasonic MIL DLNA", Match = HeaderMatchType.Substring}
}
}, },
TimelineOffsetSeconds = 10,
TranscodingProfiles = new[] TranscodingProfiles = new[]
{ {
new TranscodingProfile new TranscodingProfile
{ {
Container = "mp3", Container = "mp3",
AudioCodec = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new TranscodingProfile new TranscodingProfile
{ {
Container = "ts", Container = "ts",
AudioCodec = "ac3",
VideoCodec = "h264",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
},
new TranscodingProfile
{
Container = "jpeg",
Type = DlnaProfileType.Photo
} }
}, },
@ -641,69 +655,97 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mpeg",
Type = DlnaProfileType.Audio VideoCodec = "mpeg2video,mpeg4",
AudioCodec = "ac3,mp3",
Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mkv",
VideoCodec = "h264",
AudioCodec = "aac,ac3,mp3,pcm",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} },
}
});
list.Add(new DeviceProfile new DirectPlayProfile
{ {
//Panasonic Viera (2011|2012) With AVI Support Container = "ts",
Name = "Panasonic Viera G/GT/DT/UT/VT (2011/2012)", VideoCodec = "h264",
ClientType = "DLNA", AudioCodec = "aac,mp3",
Type = DlnaProfileType.Video
},
Identification = new DeviceIdentification new DirectPlayProfile
{ {
FriendlyName = @"(VIERA (G|D|U)T?(3|5)0?.*)|(VIERA VT50.*)", Container = "mp4",
Manufacturer = "Panasonic" VideoCodec = "h264",
}, AudioCodec = "aac,ac3,mp3,pcm",
Type = DlnaProfileType.Video
},
TranscodingProfiles = new[] new DirectPlayProfile
{
new TranscodingProfile
{ {
Container = "mp3", Container = "mov",
Type = DlnaProfileType.Audio VideoCodec = "h264",
AudioCodec = "aac,pcm",
Type = DlnaProfileType.Video
}, },
new TranscodingProfile
new DirectPlayProfile
{ {
Container = "ts", Container = "avi",
Type = DlnaProfileType.Video VideoCodec = "mpeg4",
} AudioCodec = "pcm",
}, Type = DlnaProfileType.Video
},
DirectPlayProfiles = new[]
{
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "flv",
VideoCodec = "h264",
AudioCodec = "aac",
Type = DlnaProfileType.Video
},
new DirectPlayProfile
{
Container = "mp3",
AudioCodec = "mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mp4",
Type = DlnaProfileType.Video AudioCodec = "aac",
Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile
new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "jpeg",
Type = DlnaProfileType.Video Type = DlnaProfileType.Photo,
Conditions = new List<ProfileCondition>
{
new ProfileCondition{ Condition = ProfileConditionType.LessThanEqual, Property = ProfileConditionValue.Width, Value = "1920"},
new ProfileCondition{ Condition = ProfileConditionType.LessThanEqual, Property = ProfileConditionValue.Height, Value = "1080"}
}
} }
}, },
MediaProfiles = new[] CodecProfiles = new []
{ {
new MediaProfile new CodecProfile
{ {
Container ="avi", Conditions = new List<ProfileCondition>
MimeType = "video/divx", {
Type = DlnaProfileType.Video new ProfileCondition{ Condition = ProfileConditionType.LessThanEqual, Property = ProfileConditionValue.Width, Value = "1920"},
new ProfileCondition{ Condition = ProfileConditionType.LessThanEqual, Property = ProfileConditionValue.Height, Value = "1080"},
new ProfileCondition{ Condition = ProfileConditionType.LessThanEqual, Property = ProfileConditionValue.VideoBitDepth, Value = "8", IsRequired = false}
}
} }
} }
}); });
@ -723,19 +765,19 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3", "wma"}, Container = "mp3,wma",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mkv",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
}, },
@ -808,7 +850,7 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi"}, Container = "avi",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1", VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1",
AudioCodec = "ac3,dca,mp2,mp3,pcm" AudioCodec = "ac3,dca,mp2,mp3,pcm"
@ -816,7 +858,7 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mpeg"}, Container = "mpeg",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "mpeg1video,mpeg2video", VideoCodec = "mpeg1video,mpeg2video",
AudioCodec = "ac3,dca,mp2,mp3,pcm" AudioCodec = "ac3,dca,mp2,mp3,pcm"
@ -824,7 +866,7 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mkv"}, Container = "mkv",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1", VideoCodec = "mpeg1video,mpeg2video,mpeg4,h264,vc1",
AudioCodec = "ac3,dca,aac,mp2,mp3,pcm" AudioCodec = "ac3,dca,aac,mp2,mp3,pcm"
@ -832,7 +874,7 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"ts"}, Container = "ts",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "mpeg1video,mpeg2video,h264,vc1", VideoCodec = "mpeg1video,mpeg2video,h264,vc1",
AudioCodec = "ac3,dca,mp2,mp3" AudioCodec = "ac3,dca,mp2,mp3"
@ -840,7 +882,7 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4", "mov"}, Container = "mp4,mov",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "h264,mpeg4", VideoCodec = "h264,mpeg4",
AudioCodec = "ac3,aac,mp2,mp3" AudioCodec = "ac3,aac,mp2,mp3"
@ -848,7 +890,7 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"asf"}, Container = "asf",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "vc1", VideoCodec = "vc1",
AudioCodec = "wmav2,wmapro" AudioCodec = "wmav2,wmapro"
@ -856,7 +898,7 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"asf"}, Container = "asf",
Type = DlnaProfileType.Video, Type = DlnaProfileType.Video,
VideoCodec = "mpeg2video", VideoCodec = "mpeg2video",
AudioCodec = "mp2,ac3" AudioCodec = "mp2,ac3"
@ -864,35 +906,35 @@ namespace MediaBrowser.Dlna
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3"}, Container = "mp3",
AudioCodec = "mp2,mp3", AudioCodec = "mp2,mp3",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp4"}, Container = "mp4",
AudioCodec = "mp4", AudioCodec = "mp4",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"flac"}, Container = "flac",
AudioCodec = "flac", AudioCodec = "flac",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"asf"}, Container = "asf",
AudioCodec = "wmav2,wmapro,wmavoice", AudioCodec = "wmav2,wmapro,wmavoice",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"ogg"}, Container = "ogg",
AudioCodec = "vorbis", AudioCodec = "vorbis",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
@ -901,7 +943,7 @@ namespace MediaBrowser.Dlna
{ {
Type = DlnaProfileType.Photo, Type = DlnaProfileType.Photo,
Containers = new[]{"jpeg", "png", "gif", "bmp", "tiff"}, Container = "jpeg,png,gif,bmp,tiff",
Conditions = new List<ProfileCondition> Conditions = new List<ProfileCondition>
{ {
@ -964,13 +1006,13 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3", "flac", "m4a", "wma"}, Container = "mp3,flac,m4a,wma",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi", "mp4", "mkv", "ts"}, Container = "avi,mp4,mkv,ts",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
} }
@ -991,7 +1033,7 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3", "flac", "m4a", "wma"}, Container = "mp3,flac,m4a,wma",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
} }
@ -1035,13 +1077,13 @@ namespace MediaBrowser.Dlna
{ {
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"mp3", "wma"}, Container = "mp3,wma",
Type = DlnaProfileType.Audio Type = DlnaProfileType.Audio
}, },
new DirectPlayProfile new DirectPlayProfile
{ {
Containers = new[]{"avi", "mp4"}, Container = "avi,mp4",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
} }
} }

@ -7,6 +7,7 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Session; using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Session;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Linq; using System.Linq;
@ -16,7 +17,6 @@ using System.Net.Sockets;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Model.Session;
namespace MediaBrowser.Dlna.PlayTo namespace MediaBrowser.Dlna.PlayTo
{ {
@ -54,10 +54,8 @@ namespace MediaBrowser.Dlna.PlayTo
_config = config; _config = config;
} }
public async void Start() public void Start()
{ {
_logger.Log(LogSeverity.Info, "PlayTo-Manager starting");
_locations = new ConcurrentDictionary<string, DateTime>(); _locations = new ConcurrentDictionary<string, DateTime>();
foreach (var network in NetworkInterface.GetAllNetworkInterfaces()) foreach (var network in NetworkInterface.GetAllNetworkInterfaces())
@ -73,7 +71,7 @@ namespace MediaBrowser.Dlna.PlayTo
IPAddress localIp = null; IPAddress localIp = null;
foreach (UnicastIPAddressInformation ipInfo in network.GetIPProperties().UnicastAddresses) foreach (var ipInfo in network.GetIPProperties().UnicastAddresses)
{ {
if (ipInfo.Address.AddressFamily == AddressFamily.InterNetwork) if (ipInfo.Address.AddressFamily == AddressFamily.InterNetwork)
{ {
@ -95,8 +93,6 @@ namespace MediaBrowser.Dlna.PlayTo
{ {
_logger.ErrorException("Failed to Initilize Socket", e); _logger.ErrorException("Failed to Initilize Socket", e);
} }
await Task.Delay(100).ConfigureAwait(false);
} }
} }

@ -127,11 +127,11 @@ namespace MediaBrowser.Dlna.PlayTo
{ {
var mediaPath = item.Path; var mediaPath = item.Path;
if (profile.Containers.Length > 0) if (profile.Container.Length > 0)
{ {
// Check container type // Check container type
var mediaContainer = Path.GetExtension(mediaPath); var mediaContainer = Path.GetExtension(mediaPath);
if (!profile.Containers.Any(i => string.Equals("." + i.TrimStart('.'), mediaContainer, StringComparison.OrdinalIgnoreCase))) if (!profile.GetContainers().Any(i => string.Equals("." + i.TrimStart('.'), mediaContainer, StringComparison.OrdinalIgnoreCase)))
{ {
return false; return false;
} }
@ -150,11 +150,11 @@ namespace MediaBrowser.Dlna.PlayTo
{ {
var mediaPath = item.Path; var mediaPath = item.Path;
if (profile.Containers.Length > 0) if (profile.Container.Length > 0)
{ {
// Check container type // Check container type
var mediaContainer = Path.GetExtension(mediaPath); var mediaContainer = Path.GetExtension(mediaPath);
if (!profile.Containers.Any(i => string.Equals("." + i.TrimStart('.'), mediaContainer, StringComparison.OrdinalIgnoreCase))) if (!profile.GetContainers().Any(i => string.Equals("." + i.TrimStart('.'), mediaContainer, StringComparison.OrdinalIgnoreCase)))
{ {
return false; return false;
} }
@ -178,11 +178,11 @@ namespace MediaBrowser.Dlna.PlayTo
var mediaPath = item.Path; var mediaPath = item.Path;
if (profile.Containers.Length > 0) if (profile.Container.Length > 0)
{ {
// Check container type // Check container type
var mediaContainer = Path.GetExtension(mediaPath); var mediaContainer = Path.GetExtension(mediaPath);
if (!profile.Containers.Any(i => string.Equals("." + i.TrimStart('.'), mediaContainer, StringComparison.OrdinalIgnoreCase))) if (!profile.GetContainers().Any(i => string.Equals("." + i.TrimStart('.'), mediaContainer, StringComparison.OrdinalIgnoreCase)))
{ {
return false; return false;
} }

Loading…
Cancel
Save