|
|
|
@ -49,8 +49,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|
|
|
|
_logger.Info("Copying recording stream to file {0}", targetFile);
|
|
|
|
|
|
|
|
|
|
// The media source if infinite so we need to handle stopping ourselves
|
|
|
|
|
//var durationToken = new CancellationTokenSource(duration);
|
|
|
|
|
//cancellationToken = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, durationToken.Token).Token;
|
|
|
|
|
var durationToken = new CancellationTokenSource(duration);
|
|
|
|
|
cancellationToken = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, durationToken.Token).Token;
|
|
|
|
|
|
|
|
|
|
await directStreamProvider.CopyToAsync(output, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|