add credentials to media elements

This commit is contained in:
Luke Pulverenti 2016-02-05 10:31:11 -05:00
parent bd5bad4f88
commit 4ba4072e63
2 changed files with 9 additions and 0 deletions

View File

@ -52,6 +52,8 @@ namespace MediaBrowser.Model.Dto
public string TranscodingSubProtocol { get; set; }
public string TranscodingContainer { get; set; }
public bool EnableHttpCredentials { get; set; }
public MediaSourceInfo()
{
Formats = new List<string>();
@ -61,6 +63,7 @@ namespace MediaBrowser.Model.Dto
SupportsTranscoding = true;
SupportsDirectStream = true;
SupportsDirectPlay = true;
EnableHttpCredentials = true;
}
public int? DefaultAudioStreamIndex { get; set; }

View File

@ -11,6 +11,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Server.Implementations.Sync
{
@ -137,6 +138,11 @@ namespace MediaBrowser.Server.Implementations.Sync
mediaSource.Protocol = dynamicInfo.Protocol;
mediaSource.RequiredHttpHeaders = dynamicInfo.RequiredHttpHeaders;
if (mediaSource.Protocol == MediaProtocol.Http)
{
mediaSource.EnableHttpCredentials = false;
}
return mediaSource;
}