fix segmenter semaphore (#1676)
* disable dead air watermarks by default * fix session worker semaphore * update changelog
This commit is contained in:
@@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Fixed
|
||||
- Fix some cases of 404s from Plex when files were replaced and scanning the library from ETV didn't help
|
||||
- Fix more wildcard search phrase queries (when wildcards are used in quotes, like `title:"law & order*"`)
|
||||
- Fix bug where channels would unnecessarily wait on each other
|
||||
- e.g. in-progress streams would delay responding with a playlist when new streams were starting
|
||||
|
||||
## [0.8.6-beta] - 2024-04-03
|
||||
### Added
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace ErsatzTV.Application.Streaming;
|
||||
|
||||
public class HlsSessionWorker : IHlsSessionWorker
|
||||
{
|
||||
private static readonly SemaphoreSlim Slim = new(1, 1);
|
||||
private static int _workAheadCount;
|
||||
private readonly SemaphoreSlim _slim = new(1, 1);
|
||||
private readonly IClient _client;
|
||||
private readonly IConfigElementRepository _configElementRepository;
|
||||
private readonly IHlsPlaylistFilter _hlsPlaylistFilter;
|
||||
@@ -66,14 +66,14 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
{
|
||||
_logger.LogInformation("API termination request for HLS session for channel {Channel}", _channelNumber);
|
||||
|
||||
await Slim.WaitAsync(cancellationToken);
|
||||
await _slim.WaitAsync(cancellationToken);
|
||||
try
|
||||
{
|
||||
await _cancellationTokenSource.CancelAsync();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Slim.Release();
|
||||
_slim.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
try
|
||||
{
|
||||
var sw = Stopwatch.StartNew();
|
||||
await Slim.WaitAsync(cancellationToken);
|
||||
await _slim.WaitAsync(cancellationToken);
|
||||
try
|
||||
{
|
||||
Option<string[]> maybeLines = await ReadPlaylistLines(cancellationToken);
|
||||
@@ -117,7 +117,7 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
}
|
||||
finally
|
||||
{
|
||||
Slim.Release();
|
||||
_slim.Release();
|
||||
sw.Stop();
|
||||
// _logger.LogDebug("TrimPlaylist took {Duration}", sw.Elapsed);
|
||||
}
|
||||
@@ -535,7 +535,7 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
|
||||
private async Task TrimAndDelete(CancellationToken cancellationToken)
|
||||
{
|
||||
await Slim.WaitAsync(cancellationToken);
|
||||
await _slim.WaitAsync(cancellationToken);
|
||||
try
|
||||
{
|
||||
Option<string[]> maybeLines = await ReadPlaylistLines(cancellationToken);
|
||||
@@ -555,7 +555,7 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
}
|
||||
finally
|
||||
{
|
||||
Slim.Release();
|
||||
_slim.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
|
||||
private async Task<long> GetPtsOffset(string channelNumber, CancellationToken cancellationToken)
|
||||
{
|
||||
await Slim.WaitAsync(cancellationToken);
|
||||
await _slim.WaitAsync(cancellationToken);
|
||||
try
|
||||
{
|
||||
long result = 0;
|
||||
@@ -635,7 +635,7 @@ public class HlsSessionWorker : IHlsSessionWorker
|
||||
}
|
||||
finally
|
||||
{
|
||||
Slim.Release();
|
||||
_slim.Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace ErsatzTV.Application.Streaming;
|
||||
|
||||
public class HlsSessionWorkerV2 : IHlsSessionWorker
|
||||
{
|
||||
private static readonly SemaphoreSlim Slim = new(1, 1);
|
||||
private readonly SemaphoreSlim _slim = new(1, 1);
|
||||
|
||||
//private static int _workAheadCount;
|
||||
private readonly IConfigElementRepository _configElementRepository;
|
||||
@@ -65,14 +65,14 @@ public class HlsSessionWorkerV2 : IHlsSessionWorker
|
||||
{
|
||||
_logger.LogInformation("API termination request for HLS session for channel {Channel}", _channelNumber);
|
||||
|
||||
await Slim.WaitAsync(cancellationToken);
|
||||
await _slim.WaitAsync(cancellationToken);
|
||||
try
|
||||
{
|
||||
await _cancellationTokenSource.CancelAsync();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Slim.Release();
|
||||
_slim.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public class HlsSessionWorkerV2 : IHlsSessionWorker
|
||||
|
||||
private async Task<long> GetPtsOffset(string channelNumber, CancellationToken cancellationToken)
|
||||
{
|
||||
await Slim.WaitAsync(cancellationToken);
|
||||
await _slim.WaitAsync(cancellationToken);
|
||||
try
|
||||
{
|
||||
long result = 0;
|
||||
@@ -398,7 +398,7 @@ public class HlsSessionWorkerV2 : IHlsSessionWorker
|
||||
}
|
||||
finally
|
||||
{
|
||||
Slim.Release();
|
||||
_slim.Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -466,7 +466,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
|
||||
case CustomDeadAirFallback custom:
|
||||
maybeFallback = new FillerPreset
|
||||
{
|
||||
AllowWatermarks = true,
|
||||
AllowWatermarks = false, // TODO: does this need to be configurable?
|
||||
CollectionType = custom.CollectionType,
|
||||
CollectionId = custom.CollectionId,
|
||||
MediaItemId = custom.MediaItemId,
|
||||
|
||||
Reference in New Issue
Block a user