SystemInfo.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #pragma warning disable CS1591
  2. #pragma warning disable SA1600
  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. public PackageVersionClass SystemUpdateLevel { get; set; }
  28. /// <summary>
  29. /// Gets or sets the display name of the operating system.
  30. /// </summary>
  31. /// <value>The display name of the operating system.</value>
  32. public string OperatingSystemDisplayName { get; set; }
  33. /// <summary>
  34. /// Get or sets the package name.
  35. /// </summary>
  36. /// <value>The value of the '-package' command line argument.</value>
  37. public string PackageName { get; set; }
  38. /// <summary>
  39. /// Gets or sets a value indicating whether this instance has pending restart.
  40. /// </summary>
  41. /// <value><c>true</c> if this instance has pending restart; otherwise, <c>false</c>.</value>
  42. public bool HasPendingRestart { get; set; }
  43. public bool IsShuttingDown { get; set; }
  44. /// <summary>
  45. /// Gets or sets a value indicating whether [supports library monitor].
  46. /// </summary>
  47. /// <value><c>true</c> if [supports library monitor]; otherwise, <c>false</c>.</value>
  48. public bool SupportsLibraryMonitor { get; set; }
  49. /// <summary>
  50. /// Gets or sets the web socket port number.
  51. /// </summary>
  52. /// <value>The web socket port number.</value>
  53. public int WebSocketPortNumber { get; set; }
  54. /// <summary>
  55. /// Gets or sets the completed installations.
  56. /// </summary>
  57. /// <value>The completed installations.</value>
  58. public InstallationInfo[] CompletedInstallations { get; set; }
  59. /// <summary>
  60. /// Gets or sets a value indicating whether this instance can self restart.
  61. /// </summary>
  62. /// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
  63. public bool CanSelfRestart { get; set; }
  64. public bool CanLaunchWebBrowser { get; set; }
  65. /// <summary>
  66. /// Gets or sets the program data path.
  67. /// </summary>
  68. /// <value>The program data path.</value>
  69. public string ProgramDataPath { get; set; }
  70. /// <summary>
  71. /// Gets or sets the web UI resources path.
  72. /// </summary>
  73. /// <value>The web UI resources path.</value>
  74. public string WebPath { get; set; }
  75. /// <summary>
  76. /// Gets or sets the items by name path.
  77. /// </summary>
  78. /// <value>The items by name path.</value>
  79. public string ItemsByNamePath { get; set; }
  80. /// <summary>
  81. /// Gets or sets the cache path.
  82. /// </summary>
  83. /// <value>The cache path.</value>
  84. public string CachePath { get; set; }
  85. /// <summary>
  86. /// Gets or sets the log path.
  87. /// </summary>
  88. /// <value>The log path.</value>
  89. public string LogPath { get; set; }
  90. /// <summary>
  91. /// Gets or sets the internal metadata path.
  92. /// </summary>
  93. /// <value>The internal metadata path.</value>
  94. public string InternalMetadataPath { get; set; }
  95. /// <summary>
  96. /// Gets or sets the transcode path.
  97. /// </summary>
  98. /// <value>The transcode path.</value>
  99. public string TranscodingTempPath { get; set; }
  100. /// <summary>
  101. /// Gets or sets the HTTP server port number.
  102. /// </summary>
  103. /// <value>The HTTP server port number.</value>
  104. public int HttpServerPortNumber { get; set; }
  105. /// <summary>
  106. /// Gets or sets a value indicating whether [enable HTTPS].
  107. /// </summary>
  108. /// <value><c>true</c> if [enable HTTPS]; otherwise, <c>false</c>.</value>
  109. public bool SupportsHttps { get; set; }
  110. /// <summary>
  111. /// Gets or sets the HTTPS server port number.
  112. /// </summary>
  113. /// <value>The HTTPS server port number.</value>
  114. public int HttpsPortNumber { get; set; }
  115. /// <summary>
  116. /// Gets or sets a value indicating whether this instance has update available.
  117. /// </summary>
  118. /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
  119. public bool HasUpdateAvailable { get; set; }
  120. public FFmpegLocation EncoderLocation { get; set; }
  121. public Architecture SystemArchitecture { get; set; }
  122. /// <summary>
  123. /// Initializes a new instance of the <see cref="SystemInfo" /> class.
  124. /// </summary>
  125. public SystemInfo()
  126. {
  127. CompletedInstallations = Array.Empty<InstallationInfo>();
  128. }
  129. }
  130. }