update dlna profiles
This commit is contained in:
parent
d8ec7109ab
commit
5bfcbd4e9e
|
@ -135,6 +135,18 @@ namespace Emby.Dlna.Profiles
|
||||||
{
|
{
|
||||||
Format = "sub",
|
Format = "sub",
|
||||||
Method = SubtitleDeliveryMethod.Embed
|
Method = SubtitleDeliveryMethod.Embed
|
||||||
|
},
|
||||||
|
|
||||||
|
new SubtitleProfile
|
||||||
|
{
|
||||||
|
Format = "subrip",
|
||||||
|
Method = SubtitleDeliveryMethod.Embed
|
||||||
|
},
|
||||||
|
|
||||||
|
new SubtitleProfile
|
||||||
|
{
|
||||||
|
Format = "vtt",
|
||||||
|
Method = SubtitleDeliveryMethod.Embed
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -55,5 +55,7 @@
|
||||||
<SubtitleProfile format="pgs" method="Embed" />
|
<SubtitleProfile format="pgs" method="Embed" />
|
||||||
<SubtitleProfile format="pgssub" method="Embed" />
|
<SubtitleProfile format="pgssub" method="Embed" />
|
||||||
<SubtitleProfile format="sub" method="Embed" />
|
<SubtitleProfile format="sub" method="Embed" />
|
||||||
|
<SubtitleProfile format="subrip" method="Embed" />
|
||||||
|
<SubtitleProfile format="vtt" method="Embed" />
|
||||||
</SubtitleProfiles>
|
</SubtitleProfiles>
|
||||||
</Profile>
|
</Profile>
|
|
@ -55,5 +55,7 @@
|
||||||
<SubtitleProfile format="pgs" method="Embed" />
|
<SubtitleProfile format="pgs" method="Embed" />
|
||||||
<SubtitleProfile format="pgssub" method="Embed" />
|
<SubtitleProfile format="pgssub" method="Embed" />
|
||||||
<SubtitleProfile format="sub" method="Embed" />
|
<SubtitleProfile format="sub" method="Embed" />
|
||||||
|
<SubtitleProfile format="subrip" method="Embed" />
|
||||||
|
<SubtitleProfile format="vtt" method="Embed" />
|
||||||
</SubtitleProfiles>
|
</SubtitleProfiles>
|
||||||
</Profile>
|
</Profile>
|
|
@ -61,5 +61,7 @@
|
||||||
<SubtitleProfile format="pgs" method="Embed" />
|
<SubtitleProfile format="pgs" method="Embed" />
|
||||||
<SubtitleProfile format="pgssub" method="Embed" />
|
<SubtitleProfile format="pgssub" method="Embed" />
|
||||||
<SubtitleProfile format="sub" method="Embed" />
|
<SubtitleProfile format="sub" method="Embed" />
|
||||||
|
<SubtitleProfile format="subrip" method="Embed" />
|
||||||
|
<SubtitleProfile format="vtt" method="Embed" />
|
||||||
</SubtitleProfiles>
|
</SubtitleProfiles>
|
||||||
</Profile>
|
</Profile>
|
|
@ -61,5 +61,7 @@
|
||||||
<SubtitleProfile format="pgs" method="Embed" />
|
<SubtitleProfile format="pgs" method="Embed" />
|
||||||
<SubtitleProfile format="pgssub" method="Embed" />
|
<SubtitleProfile format="pgssub" method="Embed" />
|
||||||
<SubtitleProfile format="sub" method="Embed" />
|
<SubtitleProfile format="sub" method="Embed" />
|
||||||
|
<SubtitleProfile format="subrip" method="Embed" />
|
||||||
|
<SubtitleProfile format="vtt" method="Embed" />
|
||||||
</SubtitleProfiles>
|
</SubtitleProfiles>
|
||||||
</Profile>
|
</Profile>
|
|
@ -58,6 +58,18 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
return GetHttpResult(content, contentType, true, responseHeaders);
|
return GetHttpResult(content, contentType, true, responseHeaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object GetRedirectResult(string url)
|
||||||
|
{
|
||||||
|
var responseHeaders = new Dictionary<string, string>();
|
||||||
|
responseHeaders["Location"] = url;
|
||||||
|
|
||||||
|
var result = new HttpResult(new byte[] { }, "text/plain", HttpStatusCode.Redirect);
|
||||||
|
|
||||||
|
AddResponseHeaders(result, responseHeaders);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the HTTP result.
|
/// Gets the HTTP result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -599,9 +611,9 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<IHasHeaders> GetCompressedResult(Stream stream,
|
private async Task<IHasHeaders> GetCompressedResult(Stream stream,
|
||||||
string requestedCompressionType,
|
string requestedCompressionType,
|
||||||
IDictionary<string,string> responseHeaders,
|
IDictionary<string, string> responseHeaders,
|
||||||
bool isHeadRequest,
|
bool isHeadRequest,
|
||||||
string contentType)
|
string contentType)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Api.Playback.Hls;
|
using MediaBrowser.Api.Playback.Hls;
|
||||||
using MediaBrowser.Api.Playback.Progressive;
|
using MediaBrowser.Api.Playback.Progressive;
|
||||||
|
@ -42,6 +41,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
public string Container { get; set; }
|
public string Container { get; set; }
|
||||||
|
|
||||||
public int? MaxAudioChannels { get; set; }
|
public int? MaxAudioChannels { get; set; }
|
||||||
|
public int? TranscodingAudioChannels { get; set; }
|
||||||
|
|
||||||
public long? MaxStreamingBitrate { get; set; }
|
public long? MaxStreamingBitrate { get; set; }
|
||||||
|
|
||||||
|
@ -51,6 +51,15 @@ namespace MediaBrowser.Api.Playback
|
||||||
public string TranscodingContainer { get; set; }
|
public string TranscodingContainer { get; set; }
|
||||||
public string TranscodingProtocol { get; set; }
|
public string TranscodingProtocol { get; set; }
|
||||||
public int? MaxAudioSampleRate { get; set; }
|
public int? MaxAudioSampleRate { get; set; }
|
||||||
|
|
||||||
|
public bool EnableRedirection { get; set; }
|
||||||
|
public bool EnableRemoteMedia { get; set; }
|
||||||
|
public bool BreakOnNonKeyFrames { get; set; }
|
||||||
|
|
||||||
|
public BaseUniversalRequest()
|
||||||
|
{
|
||||||
|
EnableRedirection = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("/Audio/{Id}/universal.{Container}", "GET", Summary = "Gets an audio stream")]
|
[Route("/Audio/{Id}/universal.{Container}", "GET", Summary = "Gets an audio stream")]
|
||||||
|
@ -133,7 +142,9 @@ namespace MediaBrowser.Api.Playback
|
||||||
Context = EncodingContext.Streaming,
|
Context = EncodingContext.Streaming,
|
||||||
Container = request.TranscodingContainer,
|
Container = request.TranscodingContainer,
|
||||||
AudioCodec = request.AudioCodec,
|
AudioCodec = request.AudioCodec,
|
||||||
Protocol = request.TranscodingProtocol
|
Protocol = request.TranscodingProtocol,
|
||||||
|
BreakOnNonKeyFrames = request.BreakOnNonKeyFrames,
|
||||||
|
MaxAudioChannels = request.TranscodingAudioChannels.HasValue ? request.TranscodingAudioChannels.Value.ToString(CultureInfo.InvariantCulture) : null
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -205,6 +216,17 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
var mediaSource = playbackInfoResult.MediaSources[0];
|
var mediaSource = playbackInfoResult.MediaSources[0];
|
||||||
|
|
||||||
|
if (mediaSource.SupportsDirectPlay && mediaSource.Protocol == MediaProtocol.Http)
|
||||||
|
{
|
||||||
|
if (request.EnableRedirection)
|
||||||
|
{
|
||||||
|
if (mediaSource.IsRemote && request.EnableRemoteMedia)
|
||||||
|
{
|
||||||
|
return ResultFactory.GetRedirectResult(mediaSource.Path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var isStatic = mediaSource.SupportsDirectStream;
|
var isStatic = mediaSource.SupportsDirectStream;
|
||||||
|
|
||||||
if (!isStatic && string.Equals(mediaSource.TranscodingSubProtocol, "hls", StringComparison.OrdinalIgnoreCase))
|
if (!isStatic && string.Equals(mediaSource.TranscodingSubProtocol, "hls", StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -242,7 +264,8 @@ namespace MediaBrowser.Api.Playback
|
||||||
StartTimeTicks = request.StartTimeTicks,
|
StartTimeTicks = request.StartTimeTicks,
|
||||||
Static = isStatic,
|
Static = isStatic,
|
||||||
SegmentContainer = request.TranscodingContainer,
|
SegmentContainer = request.TranscodingContainer,
|
||||||
AudioSampleRate = request.MaxAudioSampleRate
|
AudioSampleRate = request.MaxAudioSampleRate,
|
||||||
|
BreakOnNonKeyFrames = transcodingProfile.BreakOnNonKeyFrames
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isHeadRequest)
|
if (isHeadRequest)
|
||||||
|
|
|
@ -100,6 +100,7 @@ namespace MediaBrowser.Api
|
||||||
config.EnableSimpleArtistDetection = true;
|
config.EnableSimpleArtistDetection = true;
|
||||||
config.EnableNormalizedItemByNameIds = true;
|
config.EnableNormalizedItemByNameIds = true;
|
||||||
config.DisableLiveTvChannelUserDataName = true;
|
config.DisableLiveTvChannelUserDataName = true;
|
||||||
|
config.EnableSimpleSortNameHandling = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Post(UpdateStartupConfiguration request)
|
public void Post(UpdateStartupConfiguration request)
|
||||||
|
|
|
@ -655,7 +655,17 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
private string CreateSortNameFromCustomValue(string value)
|
private string CreateSortNameFromCustomValue(string value)
|
||||||
{
|
{
|
||||||
return string.IsNullOrWhiteSpace(value) ? null : ModifySortChunks(value).ToLower();
|
return string.IsNullOrWhiteSpace(value) ? null : NormalizeCustomSortName(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual string NormalizeCustomSortName(string value)
|
||||||
|
{
|
||||||
|
if (ConfigurationManager.Configuration.EnableSimpleSortNameHandling)
|
||||||
|
{
|
||||||
|
return value.RemoveDiacritics().ToLower();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ModifySortChunks(value).ToLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSortNameDefault(string value)
|
public bool IsSortNameDefault(string value)
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Number + "-" + (Name ?? string.Empty);
|
return (Number ?? string.Empty) + "-" + (Name ?? string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
|
|
|
@ -22,6 +22,8 @@ namespace MediaBrowser.Controller.Net
|
||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
object GetResult(object content, string contentType, IDictionary<string,string> responseHeaders = null);
|
object GetResult(object content, string contentType, IDictionary<string,string> responseHeaders = null);
|
||||||
|
|
||||||
|
object GetRedirectResult(string url);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the optimized result.
|
/// Gets the optimized result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// <value><c>true</c> if [enable u pn p]; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if [enable u pn p]; otherwise, <c>false</c>.</value>
|
||||||
public bool EnableUPnP { get; set; }
|
public bool EnableUPnP { get; set; }
|
||||||
|
|
||||||
|
public bool EnableSimpleSortNameHandling { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the public mapped port.
|
/// Gets or sets the public mapped port.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -77,8 +79,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
public string MetadataPath { get; set; }
|
public string MetadataPath { get; set; }
|
||||||
public string MetadataNetworkPath { get; set; }
|
public string MetadataNetworkPath { get; set; }
|
||||||
|
|
||||||
public string LastVersion { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the display name of the season zero.
|
/// Gets or sets the display name of the season zero.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user