mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 20:08:59 +02:00
add ForceLiveStream option
This commit is contained in:
parent
64795ef35b
commit
c40002dee0
4 changed files with 8 additions and 1 deletions
|
@ -2048,6 +2048,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
if (state.VideoRequest != null)
|
if (state.VideoRequest != null)
|
||||||
{
|
{
|
||||||
state.VideoRequest.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
state.VideoRequest.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
||||||
|
state.VideoRequest.ForceLiveStream = transcodingProfile.ForceLiveStream;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -443,6 +443,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
|
|
||||||
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
|
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
|
||||||
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
|
||||||
|
playlistItem.ForceLiveStream = transcodingProfile.ForceLiveStream;
|
||||||
playlistItem.SubProtocol = transcodingProfile.Protocol;
|
playlistItem.SubProtocol = transcodingProfile.Protocol;
|
||||||
playlistItem.AudioStreamIndex = audioStreamIndex;
|
playlistItem.AudioStreamIndex = audioStreamIndex;
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
public string VideoProfile { get; set; }
|
public string VideoProfile { get; set; }
|
||||||
|
|
||||||
public bool CopyTimestamps { get; set; }
|
public bool CopyTimestamps { get; set; }
|
||||||
|
public bool ForceLiveStream { get; set; }
|
||||||
public string AudioCodec { get; set; }
|
public string AudioCodec { get; set; }
|
||||||
|
|
||||||
public int? AudioStreamIndex { get; set; }
|
public int? AudioStreamIndex { get; set; }
|
||||||
|
@ -204,7 +205,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
list.Add(new NameValuePair("MaxWidth", item.MaxWidth.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxWidth.Value) : string.Empty));
|
list.Add(new NameValuePair("MaxWidth", item.MaxWidth.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxWidth.Value) : string.Empty));
|
||||||
list.Add(new NameValuePair("MaxHeight", item.MaxHeight.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxHeight.Value) : string.Empty));
|
list.Add(new NameValuePair("MaxHeight", item.MaxHeight.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxHeight.Value) : string.Empty));
|
||||||
|
|
||||||
if (StringHelper.EqualsIgnoreCase(item.SubProtocol, "hls"))
|
if (StringHelper.EqualsIgnoreCase(item.SubProtocol, "hls") && !item.ForceLiveStream)
|
||||||
{
|
{
|
||||||
list.Add(new NameValuePair("StartTimeTicks", string.Empty));
|
list.Add(new NameValuePair("StartTimeTicks", string.Empty));
|
||||||
}
|
}
|
||||||
|
@ -234,6 +235,7 @@ namespace MediaBrowser.Model.Dlna
|
||||||
}
|
}
|
||||||
|
|
||||||
list.Add(new NameValuePair("CopyTimestamps", item.CopyTimestamps.ToString().ToLower()));
|
list.Add(new NameValuePair("CopyTimestamps", item.CopyTimestamps.ToString().ToLower()));
|
||||||
|
list.Add(new NameValuePair("ForceLiveStream", item.ForceLiveStream.ToString().ToLower()));
|
||||||
list.Add(new NameValuePair("SubtitleMethod", item.SubtitleStreamIndex.HasValue && item.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External ? item.SubtitleDeliveryMethod.ToString() : string.Empty));
|
list.Add(new NameValuePair("SubtitleMethod", item.SubtitleStreamIndex.HasValue && item.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External ? item.SubtitleDeliveryMethod.ToString() : string.Empty));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -35,6 +35,9 @@ namespace MediaBrowser.Model.Dlna
|
||||||
[XmlAttribute("context")]
|
[XmlAttribute("context")]
|
||||||
public EncodingContext Context { get; set; }
|
public EncodingContext Context { get; set; }
|
||||||
|
|
||||||
|
[XmlAttribute("forceLiveStream")]
|
||||||
|
public bool ForceLiveStream { get; set; }
|
||||||
|
|
||||||
public List<string> GetAudioCodecs()
|
public List<string> GetAudioCodecs()
|
||||||
{
|
{
|
||||||
List<string> list = new List<string>();
|
List<string> list = new List<string>();
|
||||||
|
|
Loading…
Reference in a new issue