mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-09-21 12:19:47 +00:00
Don't append transcodes to transcoding temp path
This commit is contained in:
parent
d868a8da6c
commit
d4b438791f
17 changed files with 77 additions and 151 deletions
|
|
@ -0,0 +1,28 @@
|
|||
using System.IO;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
|
||||
namespace MediaBrowser.Common.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Class containing extension methods for working with the encoding configuration.
|
||||
/// </summary>
|
||||
public static class EncodingConfigurationExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the encoding options.
|
||||
/// </summary>
|
||||
/// <param name="configurationManager">The configuration manager.</param>
|
||||
/// <returns>The encoding options.</returns>
|
||||
public static EncodingOptions GetEncodingOptions(this IConfigurationManager configurationManager)
|
||||
=> configurationManager.GetConfiguration<EncodingOptions>("encoding");
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the transcoding temp path from the encoding configuration.
|
||||
/// </summary>
|
||||
/// <param name="configurationManager">The Configuration manager.</param>
|
||||
/// <returns>The transcoding temp path.</returns>
|
||||
public static string GetTranscodePath(this IConfigurationManager configurationManager)
|
||||
=> configurationManager.GetEncodingOptions().TranscodingTempPath
|
||||
?? Path.Combine(configurationManager.CommonApplicationPaths.ProgramDataPath, "transcoding-temp");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue