aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/System
diff options
context:
space:
mode:
authorWWWesten <4700006+WWWesten@users.noreply.github.com>2021-11-01 23:43:29 +0500
committerGitHub <noreply@github.com>2021-11-01 23:43:29 +0500
commit0a14279e2a21bcb9654a06a2d49e1e4f0cc5329c (patch)
treee1b1bd603b011ca98e5793e356326bf4a35a7050 /MediaBrowser.Model/System
parentf2817fef743eeb75a00782ceea363b2d3e7dc9f2 (diff)
parent76eeb8f655424d295e73ced8349c6fefee6ddb12 (diff)
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'MediaBrowser.Model/System')
-rw-r--r--MediaBrowser.Model/System/IEnvironmentInfo.cs21
-rw-r--r--MediaBrowser.Model/System/LogFile.cs3
-rw-r--r--MediaBrowser.Model/System/OperatingSystemId.cs12
-rw-r--r--MediaBrowser.Model/System/PublicSystemInfo.cs23
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs78
-rw-r--r--MediaBrowser.Model/System/WakeOnLanInfo.cs38
6 files changed, 109 insertions, 66 deletions
diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs
deleted file mode 100644
index 3ffcc7de1..000000000
--- a/MediaBrowser.Model/System/IEnvironmentInfo.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Runtime.InteropServices;
-
-namespace MediaBrowser.Model.System
-{
- public interface IEnvironmentInfo
- {
- OperatingSystem OperatingSystem { get; }
- string OperatingSystemName { get; }
- string OperatingSystemVersion { get; }
- Architecture SystemArchitecture { get; }
- }
-
- public enum OperatingSystem
- {
- Windows,
- Linux,
- OSX,
- BSD,
- Android
- }
-}
diff --git a/MediaBrowser.Model/System/LogFile.cs b/MediaBrowser.Model/System/LogFile.cs
index 913e8e1ea..aec910c92 100644
--- a/MediaBrowser.Model/System/LogFile.cs
+++ b/MediaBrowser.Model/System/LogFile.cs
@@ -1,3 +1,6 @@
+#nullable disable
+#pragma warning disable CS1591
+
using System;
namespace MediaBrowser.Model.System
diff --git a/MediaBrowser.Model/System/OperatingSystemId.cs b/MediaBrowser.Model/System/OperatingSystemId.cs
new file mode 100644
index 000000000..2e417f6b5
--- /dev/null
+++ b/MediaBrowser.Model/System/OperatingSystemId.cs
@@ -0,0 +1,12 @@
+#pragma warning disable CS1591
+
+namespace MediaBrowser.Model.System
+{
+ public enum OperatingSystemId
+ {
+ Windows,
+ Linux,
+ Darwin,
+ BSD
+ }
+}
diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs
index d97eda352..53030843a 100644
--- a/MediaBrowser.Model/System/PublicSystemInfo.cs
+++ b/MediaBrowser.Model/System/PublicSystemInfo.cs
@@ -1,3 +1,6 @@
+#nullable disable
+#pragma warning disable CS1591
+
namespace MediaBrowser.Model.System
{
public class PublicSystemInfo
@@ -9,12 +12,6 @@ namespace MediaBrowser.Model.System
public string LocalAddress { get; set; }
/// <summary>
- /// Gets or sets the wan address.
- /// </summary>
- /// <value>The wan address.</value>
- public string WanAddress { get; set; }
-
- /// <summary>
/// Gets or sets the name of the server.
/// </summary>
/// <value>The name of the server.</value>
@@ -27,6 +24,11 @@ namespace MediaBrowser.Model.System
public string Version { get; set; }
/// <summary>
+ /// Gets or sets the product name. This is the AssemblyProduct name.
+ /// </summary>
+ public string ProductName { get; set; }
+
+ /// <summary>
/// Gets or sets the operating system.
/// </summary>
/// <value>The operating system.</value>
@@ -37,5 +39,14 @@ namespace MediaBrowser.Model.System
/// </summary>
/// <value>The id.</value>
public string Id { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the startup wizard is completed.
+ /// </summary>
+ /// <remarks>
+ /// Nullable for OpenAPI specification only to retain backwards compatibility in apiclients.
+ /// </remarks>
+ /// <value>The startup completion status.</value>]
+ public bool? StartupWizardCompleted { get; set; }
}
}
diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs
index 581a1069c..a82c1c8c0 100644
--- a/MediaBrowser.Model/System/SystemInfo.cs
+++ b/MediaBrowser.Model/System/SystemInfo.cs
@@ -1,3 +1,6 @@
+#nullable disable
+#pragma warning disable CS1591
+
using System;
using System.Runtime.InteropServices;
using MediaBrowser.Model.Updates;
@@ -5,11 +8,35 @@ using MediaBrowser.Model.Updates;
namespace MediaBrowser.Model.System
{
/// <summary>
- /// Class SystemInfo
+ /// Enum describing the location of the FFmpeg tool.
+ /// </summary>
+ public enum FFmpegLocation
+ {
+ /// <summary>No path to FFmpeg found.</summary>
+ NotFound,
+
+ /// <summary>Path supplied via command line using switch --ffmpeg.</summary>
+ SetByArgument,
+
+ /// <summary>User has supplied path via Transcoding UI page.</summary>
+ Custom,
+
+ /// <summary>FFmpeg tool found on system $PATH.</summary>
+ System
+ }
+
+ /// <summary>
+ /// Class SystemInfo.
/// </summary>
public class SystemInfo : PublicSystemInfo
{
- public PackageVersionClass SystemUpdateLevel { get; set; }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SystemInfo" /> class.
+ /// </summary>
+ public SystemInfo()
+ {
+ CompletedInstallations = Array.Empty<InstallationInfo>();
+ }
/// <summary>
/// Gets or sets the display name of the operating system.
@@ -18,12 +45,7 @@ namespace MediaBrowser.Model.System
public string OperatingSystemDisplayName { get; set; }
/// <summary>
- /// The product name. This is the AssemblyProduct name.
- /// </summary>
- public string ProductName { get; set; }
-
- /// <summary>
- /// Get or sets the package name.
+ /// Gets or sets the package name.
/// </summary>
/// <value>The value of the '-package' command line argument.</value>
public string PackageName { get; set; }
@@ -69,6 +91,12 @@ namespace MediaBrowser.Model.System
public string ProgramDataPath { get; set; }
/// <summary>
+ /// Gets or sets the web UI resources path.
+ /// </summary>
+ /// <value>The web UI resources path.</value>
+ public string WebPath { get; set; }
+
+ /// <summary>
/// Gets or sets the items by name path.
/// </summary>
/// <value>The items by name path.</value>
@@ -93,45 +121,21 @@ namespace MediaBrowser.Model.System
public string InternalMetadataPath { get; set; }
/// <summary>
- /// Gets or sets the transcoding temporary path.
+ /// Gets or sets the transcode path.
/// </summary>
- /// <value>The transcoding temporary path.</value>
+ /// <value>The transcode path.</value>
public string TranscodingTempPath { get; set; }
/// <summary>
- /// Gets or sets the HTTP server port number.
- /// </summary>
- /// <value>The HTTP server port number.</value>
- public int HttpServerPortNumber { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether [enable HTTPS].
- /// </summary>
- /// <value><c>true</c> if [enable HTTPS]; otherwise, <c>false</c>.</value>
- public bool SupportsHttps { get; set; }
-
- /// <summary>
- /// Gets or sets the HTTPS server port number.
- /// </summary>
- /// <value>The HTTPS server port number.</value>
- public int HttpsPortNumber { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether this instance has update available.
/// </summary>
/// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
+ [Obsolete("This should be handled by the package manager")]
public bool HasUpdateAvailable { get; set; }
- public string EncoderLocationType { get; set; }
+ [Obsolete("This isn't set correctly anymore")]
+ public FFmpegLocation EncoderLocation { get; set; }
public Architecture SystemArchitecture { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="SystemInfo" /> class.
- /// </summary>
- public SystemInfo()
- {
- CompletedInstallations = Array.Empty<InstallationInfo>();
- }
}
}
diff --git a/MediaBrowser.Model/System/WakeOnLanInfo.cs b/MediaBrowser.Model/System/WakeOnLanInfo.cs
index 031458735..aba19a6ba 100644
--- a/MediaBrowser.Model/System/WakeOnLanInfo.cs
+++ b/MediaBrowser.Model/System/WakeOnLanInfo.cs
@@ -1,13 +1,47 @@
+using System.Net.NetworkInformation;
+
namespace MediaBrowser.Model.System
{
+ /// <summary>
+ /// Provides the MAC address and port for wake-on-LAN functionality.
+ /// </summary>
public class WakeOnLanInfo
{
- public string MacAddress { get; set; }
- public int Port { get; set; }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
+ /// </summary>
+ /// <param name="macAddress">The MAC address.</param>
+ public WakeOnLanInfo(PhysicalAddress macAddress) : this(macAddress.ToString())
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
+ /// </summary>
+ /// <param name="macAddress">The MAC address.</param>
+ public WakeOnLanInfo(string macAddress) : this()
+ {
+ MacAddress = macAddress;
+ }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
+ /// </summary>
public WakeOnLanInfo()
{
Port = 9;
}
+
+ /// <summary>
+ /// Gets the MAC address of the device.
+ /// </summary>
+ /// <value>The MAC address.</value>
+ public string? MacAddress { get; }
+
+ /// <summary>
+ /// Gets or sets the wake-on-LAN port.
+ /// </summary>
+ /// <value>The wake-on-LAN port.</value>
+ public int Port { get; set; }
}
}