mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-15 21:43:03 +03:00
Move methods to the right class
This commit is contained in:
@@ -53,6 +53,7 @@ namespace Jellyfin.Api.Helpers
|
||||
private readonly IServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly ISessionManager _sessionManager;
|
||||
private readonly ILoggerFactory _loggerFactory;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TranscodingJobHelper"/> class.
|
||||
@@ -90,10 +91,12 @@ namespace Jellyfin.Api.Helpers
|
||||
_authorizationContext = authorizationContext;
|
||||
_isoManager = isoManager;
|
||||
_loggerFactory = loggerFactory;
|
||||
|
||||
_encodingHelper = new EncodingHelper(mediaEncoder, fileSystem, subtitleEncoder, configuration);
|
||||
|
||||
DeleteEncodedMediaCache();
|
||||
|
||||
sessionManager!.PlaybackProgress += OnPlaybackProgress;
|
||||
sessionManager!.PlaybackStart += OnPlaybackProgress;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -834,6 +837,14 @@ namespace Jellyfin.Api.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPlaybackProgress(object sender, PlaybackProgressEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(e.PlaySessionId))
|
||||
{
|
||||
PingTranscodingJob(e.PlaySessionId, e.IsPaused);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the encoded media cache.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user