mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
fix mac ffmpeg build
This commit is contained in:
@@ -219,7 +219,8 @@ namespace MediaBrowser.ServerApplication
|
||||
private ISyncRepository SyncRepository { get; set; }
|
||||
private ITVSeriesManager TVSeriesManager { get; set; }
|
||||
|
||||
private StartupOptions _startupOptions;
|
||||
private readonly StartupOptions _startupOptions;
|
||||
private readonly string _remotePackageName;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApplicationHost" /> class.
|
||||
@@ -229,14 +230,16 @@ namespace MediaBrowser.ServerApplication
|
||||
/// <param name="supportsRunningAsService">if set to <c>true</c> [supports running as service].</param>
|
||||
/// <param name="isRunningAsService">if set to <c>true</c> [is running as service].</param>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <param name="remotePackageName">Name of the remote package.</param>
|
||||
public ApplicationHost(ServerApplicationPaths applicationPaths,
|
||||
ILogManager logManager,
|
||||
bool supportsRunningAsService,
|
||||
bool isRunningAsService,
|
||||
StartupOptions options)
|
||||
StartupOptions options, string remotePackageName)
|
||||
: base(applicationPaths, logManager)
|
||||
{
|
||||
_startupOptions = options;
|
||||
_remotePackageName = remotePackageName;
|
||||
_isRunningAsService = isRunningAsService;
|
||||
SupportsRunningAsService = supportsRunningAsService;
|
||||
}
|
||||
@@ -1091,9 +1094,17 @@ namespace MediaBrowser.ServerApplication
|
||||
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||
public override async Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
|
||||
{
|
||||
var result = await NativeApp.CheckForApplicationUpdate(ApplicationVersion,
|
||||
ConfigurationManager.CommonConfiguration.SystemUpdateLevel, InstallationManager,
|
||||
cancellationToken, progress).ConfigureAwait(false);
|
||||
var availablePackages = await InstallationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var version = InstallationManager.GetLatestCompatibleVersion(availablePackages, _remotePackageName, null, ApplicationVersion, ConfigurationManager.CommonConfiguration.SystemUpdateLevel);
|
||||
|
||||
var versionObject = version == null || string.IsNullOrWhiteSpace(version.versionStr) ? null : new Version(version.versionStr);
|
||||
|
||||
var isUpdateAvailable = versionObject != null && versionObject > ApplicationVersion;
|
||||
|
||||
var result = versionObject != null ?
|
||||
new CheckForUpdateResult { AvailableVersion = versionObject.ToString(), IsUpdateAvailable = isUpdateAvailable, Package = version } :
|
||||
new CheckForUpdateResult { AvailableVersion = ApplicationVersion.ToString(), IsUpdateAvailable = false };
|
||||
|
||||
HasUpdateAvailable = result.IsUpdateAvailable;
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg
|
||||
case "FFProbeFilename":
|
||||
return "ffprobe";
|
||||
case "ArchiveType":
|
||||
return "gz";
|
||||
return "7z";
|
||||
}
|
||||
}
|
||||
if (PlatformDetection.IsX86)
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace MediaBrowser.ServerApplication
|
||||
/// <param name="options">The options.</param>
|
||||
private static void RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, bool runService, StartupOptions options)
|
||||
{
|
||||
_appHost = new ApplicationHost(appPaths, logManager, true, runService, options);
|
||||
_appHost = new ApplicationHost(appPaths, logManager, true, runService, options, "MBServer");
|
||||
|
||||
var initProgress = new Progress<double>();
|
||||
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Updates;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
@@ -90,24 +84,5 @@ namespace MediaBrowser.ServerApplication.Native
|
||||
EXECUTION_STATE es = SetThreadExecutionState(EXECUTION_STATE.ES_SYSTEM_REQUIRED);
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<CheckForUpdateResult> CheckForApplicationUpdate(Version currentVersion,
|
||||
PackageVersionClass updateLevel,
|
||||
IInstallationManager installationManager,
|
||||
CancellationToken cancellationToken,
|
||||
IProgress<double> progress)
|
||||
{
|
||||
var availablePackages = await installationManager.GetAvailablePackagesWithoutRegistrationInfo(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var version = installationManager.GetLatestCompatibleVersion(availablePackages, "MBServer", null, currentVersion, updateLevel);
|
||||
|
||||
var versionObject = version == null || string.IsNullOrWhiteSpace(version.versionStr) ? null : new Version(version.versionStr);
|
||||
|
||||
var isUpdateAvailable = versionObject != null && versionObject > currentVersion;
|
||||
|
||||
return versionObject != null ?
|
||||
new CheckForUpdateResult { AvailableVersion = versionObject.ToString(), IsUpdateAvailable = isUpdateAvailable, Package = version } :
|
||||
new CheckForUpdateResult { AvailableVersion = currentVersion.ToString(), IsUpdateAvailable = false };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user