SystemInfo.cs 5.2 KB

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