mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-20 15:54:38 +00:00
added full m3u8 generation
This commit is contained in:
parent
17962f2e61
commit
e4f5a3f005
8 changed files with 186 additions and 99 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using ServiceStack.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
@ -13,6 +14,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
public class StreamWriter : IStreamWriter, IHasOptions
|
||||
{
|
||||
private ILogger Logger { get; set; }
|
||||
|
||||
private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the source stream.
|
||||
|
|
@ -50,6 +53,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
Logger = logger;
|
||||
|
||||
Options["Content-Type"] = contentType;
|
||||
|
||||
if (source.CanSeek)
|
||||
{
|
||||
Options["Content-Length"] = source.Length.ToString(UsCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue