mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-24 16:40:25 +01:00
update startup wizard
This commit is contained in:
@@ -647,15 +647,20 @@ namespace MediaBrowser.Server.Startup.Common
|
||||
/// <returns>Task.</returns>
|
||||
private async Task RegisterMediaEncoder(IProgress<double> progress)
|
||||
{
|
||||
string encoderPath = null;
|
||||
string probePath = null;
|
||||
|
||||
var info = await new FFMpegLoader(Logger, ApplicationPaths, HttpClient, ZipClient, FileSystemManager, NativeApp.Environment, NativeApp.GetFfmpegInstallInfo())
|
||||
.GetFFMpegInfo(NativeApp.Environment, _startupOptions, progress).ConfigureAwait(false);
|
||||
|
||||
_hasExternalEncoder = string.Equals(info.Version, "custom", StringComparison.OrdinalIgnoreCase);
|
||||
encoderPath = info.EncoderPath;
|
||||
probePath = info.ProbePath;
|
||||
_hasExternalEncoder = string.Equals(info.Version, "external", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
var mediaEncoder = new MediaEncoder(LogManager.GetLogger("MediaEncoder"),
|
||||
JsonSerializer,
|
||||
info.EncoderPath,
|
||||
info.ProbePath,
|
||||
encoderPath,
|
||||
probePath,
|
||||
_hasExternalEncoder,
|
||||
ServerConfigurationManager,
|
||||
FileSystemManager,
|
||||
@@ -1145,7 +1150,8 @@ namespace MediaBrowser.Server.Startup.Common
|
||||
ServerName = FriendlyName,
|
||||
LocalAddress = localAddress,
|
||||
SupportsLibraryMonitor = SupportsLibraryMonitor,
|
||||
HasExternalEncoder = _hasExternalEncoder
|
||||
HasExternalEncoder = _hasExternalEncoder,
|
||||
SystemArchitecture = NativeApp.Environment.SystemArchitecture
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -53,13 +53,17 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
||||
{
|
||||
ProbePath = customffProbePath,
|
||||
EncoderPath = customffMpegPath,
|
||||
Version = "custom"
|
||||
Version = "external"
|
||||
};
|
||||
}
|
||||
|
||||
var downloadInfo = _ffmpegInstallInfo;
|
||||
|
||||
var version = downloadInfo.Version;
|
||||
if (string.Equals(version, "0", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new FFMpegInfo();
|
||||
}
|
||||
|
||||
if (string.Equals(version, "path", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -175,18 +179,6 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
|
||||
return null;
|
||||
}
|
||||
|
||||
private async void DownloadFFMpegInBackground(FFMpegInstallInfo downloadinfo, string directory)
|
||||
{
|
||||
try
|
||||
{
|
||||
await DownloadFFMpeg(downloadinfo, directory, new Progress<double>()).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error downloading ffmpeg", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DownloadFFMpeg(FFMpegInstallInfo downloadinfo, string directory, IProgress<double> progress)
|
||||
{
|
||||
foreach (var url in downloadinfo.DownloadUrls)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
using MediaBrowser.Model.System;
|
||||
|
||||
namespace MediaBrowser.Server.Startup.Common
|
||||
{
|
||||
public class NativeEnvironment
|
||||
@@ -15,11 +16,4 @@ namespace MediaBrowser.Server.Startup.Common
|
||||
Bsd = 2,
|
||||
Linux = 3
|
||||
}
|
||||
|
||||
public enum Architecture
|
||||
{
|
||||
X86 = 0,
|
||||
X86_X64 = 1,
|
||||
Arm = 2
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user