Make ILiveStream an IDisposable

This commit is contained in:
Patrick Barron
2023-12-05 14:26:35 -05:00
parent 669baf98a5
commit 192559db32
3 changed files with 23 additions and 2 deletions

View File

@@ -112,6 +112,21 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
return stream;
}
/// <inheritdoc />
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool dispose)
{
if (dispose)
{
LiveStreamCancellationTokenSource?.Dispose();
}
}
protected async Task DeleteTempFiles(string path, int retryCount = 0)
{
if (retryCount == 0)