From be29b4a0c4e0a525da0a8537810d11586cec9b67 Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Tue, 6 Feb 2024 22:16:41 +0100 Subject: Fix some incompatible API deprecations --- MediaBrowser.Model/System/SystemInfo.cs | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'MediaBrowser.Model/System/SystemInfo.cs') diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index aa7c03ebd..f37ac6a14 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -3,29 +3,11 @@ using System; using System.Collections.Generic; -using System.Runtime.InteropServices; +using System.ComponentModel; using MediaBrowser.Model.Updates; namespace MediaBrowser.Model.System { - /// - /// Enum describing the location of the FFmpeg tool. - /// - public enum FFmpegLocation - { - /// No path to FFmpeg found. - NotFound, - - /// Path supplied via command line using switch --ffmpeg. - SetByArgument, - - /// User has supplied path via Transcoding UI page. - Custom, - - /// FFmpeg tool found on system $PATH. - System - } - /// /// Class SystemInfo. /// @@ -83,9 +65,11 @@ namespace MediaBrowser.Model.System /// /// true. [Obsolete("This is always true")] + [DefaultValue(true)] public bool CanSelfRestart { get; set; } = true; [Obsolete("This is always false")] + [DefaultValue(false)] public bool CanLaunchWebBrowser { get; set; } = false; /// @@ -140,12 +124,15 @@ namespace MediaBrowser.Model.System /// /// true if this instance has update available; otherwise, false. [Obsolete("This should be handled by the package manager")] + [DefaultValue(false)] public bool HasUpdateAvailable { get; set; } [Obsolete("This isn't set correctly anymore")] - public FFmpegLocation EncoderLocation { get; set; } + [DefaultValue("System")] + public string EncoderLocation { get; set; } = "System"; [Obsolete("This is no longer set")] - public Architecture SystemArchitecture { get; set; } = Architecture.X64; + [DefaultValue("X64")] + public string SystemArchitecture { get; set; } = "X64"; } } -- cgit v1.2.3