added full m3u8 generation

This commit is contained in:
Luke Pulverenti
2014-01-12 16:32:13 -05:00
parent 17962f2e61
commit e4f5a3f005
8 changed files with 186 additions and 99 deletions

View File

@@ -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>