mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 15:20:34 +02:00
Remove duplicate code
This commit is contained in:
parent
8e05b22645
commit
a7eee4f4e5
|
@ -204,58 +204,6 @@ namespace Jellyfin.Api.Controllers
|
|||
if (isHeadRequest)
|
||||
{
|
||||
dynamicHlsController.Request.Method = HttpMethod.Head.Method;
|
||||
return await dynamicHlsController.GetMasterHlsAudioPlaylist(
|
||||
itemId,
|
||||
".m3u8",
|
||||
isStatic,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
playbackInfoResult.Value.PlaySessionId,
|
||||
// fallback to mpegts if device reports some weird value unsupported by hls
|
||||
Array.Exists(supportedHlsContainers, element => element == transcodingContainer) ? transcodingContainer : "mpegts",
|
||||
null,
|
||||
null,
|
||||
mediaSource.Id,
|
||||
deviceId,
|
||||
transcodingProfile.AudioCodec,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
transcodingProfile.BreakOnNonKeyFrames,
|
||||
maxAudioSampleRate,
|
||||
maxAudioBitDepth,
|
||||
null,
|
||||
isStatic ? (int?)null : Convert.ToInt32(Math.Min(maxStreamingBitrate ?? 192000, int.MaxValue)),
|
||||
maxAudioChannels,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
startTimeTicks,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
SubtitleDeliveryMethod.Hls,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
mediaSource.TranscodeReasons == null ? null : string.Join(",", mediaSource.TranscodeReasons.Select(i => i.ToString()).ToArray()),
|
||||
null,
|
||||
null,
|
||||
EncodingContext.Static,
|
||||
new Dictionary<string, string>())
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await dynamicHlsController.GetMasterHlsAudioPlaylist(
|
||||
|
@ -331,57 +279,6 @@ namespace Jellyfin.Api.Controllers
|
|||
if (isHeadRequest)
|
||||
{
|
||||
audioController.Request.Method = HttpMethod.Head.Method;
|
||||
return await audioController.GetAudioStream(
|
||||
itemId,
|
||||
isStatic ? null : ("." + mediaSource.TranscodingContainer),
|
||||
isStatic,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
playbackInfoResult.Value.PlaySessionId,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
mediaSource.Id,
|
||||
deviceId,
|
||||
audioCodec,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
breakOnNonKeyFrames,
|
||||
maxAudioSampleRate,
|
||||
maxAudioBitDepth,
|
||||
isStatic ? (int?)null : Convert.ToInt32(Math.Min(maxStreamingBitrate ?? 192000, int.MaxValue)),
|
||||
null,
|
||||
maxAudioChannels,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
startTimeTicks,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
SubtitleDeliveryMethod.Embed,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
mediaSource.TranscodeReasons == null ? null : string.Join(",", mediaSource.TranscodeReasons.Select(i => i.ToString()).ToArray()),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return await audioController.GetAudioStream(
|
||||
|
|
Loading…
Reference in a new issue