SystemInfo.cs 5.4 KB

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