hls fixes

This commit is contained in:
Luke Pulverenti 2015-03-17 17:02:54 -04:00
parent f251fd5abf
commit cafc8356b2
2 changed files with 9 additions and 6 deletions

View File

@ -290,12 +290,15 @@ namespace MediaBrowser.Api.Playback.Hls
{
using (var reader = new StreamReader(fileStream))
{
var text = await reader.ReadToEndAsync().ConfigureAwait(false);
// If it appears in the playlist, it's done
if (text.IndexOf(segmentFilename, StringComparison.OrdinalIgnoreCase) != -1)
while (!reader.EndOfStream)
{
return GetSegmentResult(segmentPath, segmentIndex, segmentLength, transcodingJob);
var text = await reader.ReadLineAsync().ConfigureAwait(false);
// If it appears in the playlist, it's done
if (text.IndexOf(segmentFilename, StringComparison.OrdinalIgnoreCase) != -1)
{
return GetSegmentResult(segmentPath, segmentIndex, segmentLength, transcodingJob);
}
}
}
}

View File

@ -66,7 +66,7 @@ namespace MediaBrowser.Api.Playback
public string LiveTvStreamId { get; set; }
public int SegmentLength = 3;
public bool EnableGenericHlsSegmenter;
public bool EnableGenericHlsSegmenter = false;
public int HlsListSize
{
get