mirror of https://github.com/jellyfin/jellyfin.git
add credentials to media elements
This commit is contained in:
parent
bd5bad4f88
commit
4ba4072e63
|
@ -52,6 +52,8 @@ namespace MediaBrowser.Model.Dto
|
||||||
public string TranscodingSubProtocol { get; set; }
|
public string TranscodingSubProtocol { get; set; }
|
||||||
public string TranscodingContainer { get; set; }
|
public string TranscodingContainer { get; set; }
|
||||||
|
|
||||||
|
public bool EnableHttpCredentials { get; set; }
|
||||||
|
|
||||||
public MediaSourceInfo()
|
public MediaSourceInfo()
|
||||||
{
|
{
|
||||||
Formats = new List<string>();
|
Formats = new List<string>();
|
||||||
|
@ -61,6 +63,7 @@ namespace MediaBrowser.Model.Dto
|
||||||
SupportsTranscoding = true;
|
SupportsTranscoding = true;
|
||||||
SupportsDirectStream = true;
|
SupportsDirectStream = true;
|
||||||
SupportsDirectPlay = true;
|
SupportsDirectPlay = true;
|
||||||
|
EnableHttpCredentials = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int? DefaultAudioStreamIndex { get; set; }
|
public int? DefaultAudioStreamIndex { get; set; }
|
||||||
|
|
|
@ -11,6 +11,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Model.MediaInfo;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Sync
|
namespace MediaBrowser.Server.Implementations.Sync
|
||||||
{
|
{
|
||||||
|
@ -137,6 +138,11 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||||
mediaSource.Protocol = dynamicInfo.Protocol;
|
mediaSource.Protocol = dynamicInfo.Protocol;
|
||||||
mediaSource.RequiredHttpHeaders = dynamicInfo.RequiredHttpHeaders;
|
mediaSource.RequiredHttpHeaders = dynamicInfo.RequiredHttpHeaders;
|
||||||
|
|
||||||
|
if (mediaSource.Protocol == MediaProtocol.Http)
|
||||||
|
{
|
||||||
|
mediaSource.EnableHttpCredentials = false;
|
||||||
|
}
|
||||||
|
|
||||||
return mediaSource;
|
return mediaSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue