diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f5d0edf2..ce1f5e473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Fixed - Fix removing Jellyfin and Emby libraries that have been deleted from the source media server +- Fix `Work-Ahead HLS Segmenter Limit` setting to properly limit number of channels that can work-ahead at once ### Added - Add audio stream selector scripts for episodes and movies diff --git a/ErsatzTV.Application/Streaming/HlsSessionWorker.cs b/ErsatzTV.Application/Streaming/HlsSessionWorker.cs index 9c456133e..220310c3a 100644 --- a/ErsatzTV.Application/Streaming/HlsSessionWorker.cs +++ b/ErsatzTV.Application/Streaming/HlsSessionWorker.cs @@ -351,7 +351,10 @@ public class HlsSessionWorker : IHlsSessionWorker } finally { - Interlocked.Decrement(ref _workAheadCount); + if (!realtime) + { + Interlocked.Decrement(ref _workAheadCount); + } } return false;