|
|
@ -290,12 +290,15 @@ namespace MediaBrowser.Api.Playback.Hls
|
|
|
|
{
|
|
|
|
{
|
|
|
|
using (var reader = new StreamReader(fileStream))
|
|
|
|
using (var reader = new StreamReader(fileStream))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var text = await reader.ReadToEndAsync().ConfigureAwait(false);
|
|
|
|
while (!reader.EndOfStream)
|
|
|
|
|
|
|
|
|
|
|
|
// If it appears in the playlist, it's done
|
|
|
|
|
|
|
|
if (text.IndexOf(segmentFilename, StringComparison.OrdinalIgnoreCase) != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|