SystemInfo.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Runtime.InteropServices;
  5. using MediaBrowser.Model.Updates;
  6. namespace MediaBrowser.Model.System
  7. {
  8. /// <summary>
  9. /// Enum describing the location of the FFmpeg tool.
  10. /// </summary>
  11. public enum FFmpegLocation
  12. {
  13. /// <summary>No path to FFmpeg found.</summary>
  14. NotFound,
  15. /// <summary>Path supplied via command line using switch --ffmpeg.</summary>
  16. SetByArgument,
  17. /// <summary>User has supplied path via Transcoding UI page.</summary>
  18. Custom,
  19. /// <summary>FFmpeg tool found on system $PATH.</summary>
  20. System
  21. }
  22. /// <summary>
  23. /// Class SystemInfo.
  24. /// </summary>
  25. public class SystemInfo : PublicSystemInfo
  26. {
  27. /// <summary>
  28. /// Initializes a new instance of the <see cref="SystemInfo" /> class.
  29. /// </summary>
  30. public SystemInfo()
  31. {
  32. CompletedInstallations = Array.Empty<InstallationInfo>();
  33. }
  34. /// <summary>
  35. /// Gets or sets the display name of the operating system.
  36. /// </summary>
  37. /// <value>The display name of the operating system.</value>
  38. [Obsolete("This is no longer set")]
  39. public string OperatingSystemDisplayName { get; set; } = string.Empty;
  40. /// <summary>
  41. /// Gets or sets the package name.
  42. /// </summary>
  43. /// <value>The value of the '-package' command line argument.</value>
  44. public string PackageName { get; set; }
  45. /// <summary>
  46. /// Gets or sets a value indicating whether this instance has pending restart.
  47. /// </summary>
  48. /// <value><c>true</c> if this instance has pending restart; otherwise, <c>false</c>.</value>
  49. public bool HasPendingRestart { get; set; }
  50. public bool IsShuttingDown { get; set; }
  51. /// <summary>
  52. /// Gets or sets a value indicating whether [supports library monitor].
  53. /// </summary>
  54. /// <value><c>true</c> if [supports library monitor]; otherwise, <c>false</c>.</value>
  55. public bool SupportsLibraryMonitor { get; set; }
  56. /// <summary>
  57. /// Gets or sets the web socket port number.
  58. /// </summary>
  59. /// <value>The web socket port number.</value>
  60. public int WebSocketPortNumber { get; set; }
  61. /// <summary>
  62. /// Gets or sets the completed installations.
  63. /// </summary>
  64. /// <value>The completed installations.</value>
  65. public InstallationInfo[] CompletedInstallations { get; set; }
  66. /// <summary>
  67. /// Gets or sets a value indicating whether this instance can self restart.
  68. /// </summary>
  69. /// <value><c>true</c>.</value>
  70. [Obsolete("This is always true")]
  71. public bool CanSelfRestart { get; set; } = true;
  72. public bool CanLaunchWebBrowser { get; set; }
  73. /// <summary>
  74. /// Gets or sets the program data path.
  75. /// </summary>
  76. /// <value>The program data path.</value>
  77. public string ProgramDataPath { get; set; }
  78. /// <summary>
  79. /// Gets or sets the web UI resources path.
  80. /// </summary>
  81. /// <value>The web UI resources path.</value>
  82. public string WebPath { get; set; }
  83. /// <summary>
  84. /// Gets or sets the items by name path.
  85. /// </summary>
  86. /// <value>The items by name path.</value>
  87. public string ItemsByNamePath { get; set; }
  88. /// <summary>
  89. /// Gets or sets the cache path.
  90. /// </summary>
  91. /// <value>The cache path.</value>
  92. public string CachePath { get; set; }
  93. /// <summary>
  94. /// Gets or sets the log path.
  95. /// </summary>
  96. /// <value>The log path.</value>
  97. public string LogPath { get; set; }
  98. /// <summary>
  99. /// Gets or sets the internal metadata path.
  100. /// </summary>
  101. /// <value>The internal metadata path.</value>
  102. public string InternalMetadataPath { get; set; }
  103. /// <summary>
  104. /// Gets or sets the transcode path.
  105. /// </summary>
  106. /// <value>The transcode path.</value>
  107. public string TranscodingTempPath { get; set; }
  108. /// <summary>
  109. /// Gets or sets a value indicating whether this instance has update available.
  110. /// </summary>
  111. /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
  112. [Obsolete("This should be handled by the package manager")]
  113. public bool HasUpdateAvailable { get; set; }
  114. [Obsolete("This isn't set correctly anymore")]
  115. public FFmpegLocation EncoderLocation { get; set; }
  116. [Obsolete("This is no longer set")]
  117. public Architecture SystemArchitecture { get; set; } = Architecture.X64;
  118. }
  119. }