mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Make IRecorder an IDisposable
This commit is contained in:
parent
5c593b120a
commit
669baf98a5
@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging;
|
|||||||
|
|
||||||
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
public class DirectRecorder : IRecorder
|
public sealed class DirectRecorder : IRecorder
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IHttpClientFactory _httpClientFactory;
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
@ -109,5 +109,10 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||||||
_logger.LogInformation("Recording completed to file {0}", targetFile);
|
_logger.LogInformation("Recording completed to file {0}", targetFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1269,7 +1269,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||||||
directStreamProvider = liveStreamResponse.Item2;
|
directStreamProvider = liveStreamResponse.Item2;
|
||||||
}
|
}
|
||||||
|
|
||||||
var recorder = GetRecorder(mediaStreamInfo);
|
using var recorder = GetRecorder(mediaStreamInfo);
|
||||||
|
|
||||||
recordPath = recorder.GetOutputPath(mediaStreamInfo, recordPath);
|
recordPath = recorder.GetOutputPath(mediaStreamInfo, recordPath);
|
||||||
recordPath = EnsureFileUnique(recordPath, timer.Id);
|
recordPath = EnsureFileUnique(recordPath, timer.Id);
|
||||||
|
@ -25,7 +25,7 @@ using Microsoft.Extensions.Logging;
|
|||||||
|
|
||||||
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
public class EncodedRecorder : IRecorder, IDisposable
|
public class EncodedRecorder : IRecorder
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IMediaEncoder _mediaEncoder;
|
private readonly IMediaEncoder _mediaEncoder;
|
||||||
@ -37,7 +37,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
|||||||
private FileStream _logFileStream;
|
private FileStream _logFileStream;
|
||||||
private string _targetPath;
|
private string _targetPath;
|
||||||
private Process _process;
|
private Process _process;
|
||||||
private bool _disposed = false;
|
private bool _disposed;
|
||||||
|
|
||||||
public EncodedRecorder(
|
public EncodedRecorder(
|
||||||
ILogger logger,
|
ILogger logger,
|
||||||
|
@ -8,7 +8,7 @@ using MediaBrowser.Model.Dto;
|
|||||||
|
|
||||||
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
public interface IRecorder
|
public interface IRecorder : IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Records the specified media source.
|
/// Records the specified media source.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user