SystemInfo.cs 5.2 KB

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