SystemInfo.cs 5.0 KB

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