diff options
| author | crobibero <cody@robibe.ro> | 2020-07-31 09:19:02 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-07-31 09:19:02 -0600 |
| commit | 9171e904de8c3de2dd8049ba3a1ff11340269f2d (patch) | |
| tree | cb26786e6a1db8f2f3d5b1a330b09146c0ccb608 /Jellyfin.Api/Helpers/TranscodingJobHelper.cs | |
| parent | f543a17d1b8a4e1e2f420831de586e9ecc015166 (diff) | |
| parent | 62fa72114cd543d47b2f8904cc55d90a30ac02e6 (diff) | |
Merge remote-tracking branch 'upstream/api-migration' into api-video
Diffstat (limited to 'Jellyfin.Api/Helpers/TranscodingJobHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/TranscodingJobHelper.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs index fc38eacaf..16272c37a 100644 --- a/Jellyfin.Api/Helpers/TranscodingJobHelper.cs +++ b/Jellyfin.Api/Helpers/TranscodingJobHelper.cs @@ -727,6 +727,20 @@ namespace Jellyfin.Api.Helpers } /// <summary> + /// Transcoding video finished. Decrement the active request counter. + /// </summary> + /// <param name="job">The <see cref="TranscodingJobDto"/> which ended.</param> + public void OnTranscodeEndRequest(TranscodingJobDto job) + { + job.ActiveRequestCount--; + _logger.LogDebug("OnTranscodeEndRequest job.ActiveRequestCount={0}", job.ActiveRequestCount); + if (job.ActiveRequestCount <= 0) + { + PingTimer(job, false); + } + } + + /// <summary> /// Processes the exited. /// </summary> /// <param name="process">The process.</param> |
