From 6acfee7df67b95b919c6d3aedf3fc16b25edf974 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 14 Mar 2015 14:54:53 -0400 Subject: [PATCH] update StreamBuilder --- MediaBrowser.Model/Dlna/StreamBuilder.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 07c7ecd8b..b798da748 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -184,6 +184,12 @@ namespace MediaBrowser.Model.Dlna { playlistItem.PlayMethod = PlayMethod.DirectPlay; } + else if (item.Protocol == MediaProtocol.Http && + directPlayMethods.Contains(PlayMethod.DirectPlay) && + _localPlayer.CanAccessUrl(item.Path, item.RequiredHttpHeaders.Count > 0)) + { + playlistItem.PlayMethod = PlayMethod.DirectPlay; + } else if (directPlayMethods.Contains(PlayMethod.DirectStream)) { playlistItem.PlayMethod = PlayMethod.DirectStream; @@ -578,9 +584,12 @@ namespace MediaBrowser.Model.Dlna } } - else if (mediaSource.Protocol == MediaProtocol.File && _localPlayer.CanAccessFile(mediaSource.Path)) + else if (mediaSource.Protocol == MediaProtocol.File) { - return PlayMethod.DirectPlay; + if (_localPlayer.CanAccessFile(mediaSource.Path)) + { + return PlayMethod.DirectPlay; + } } return PlayMethod.DirectStream;