PluginManifest.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #nullable enable
  2. using System;
  3. using System.Text.Json.Serialization;
  4. using MediaBrowser.Model.Plugins;
  5. namespace MediaBrowser.Common.Plugins
  6. {
  7. /// <summary>
  8. /// Defines a Plugin manifest file.
  9. /// </summary>
  10. public class PluginManifest
  11. {
  12. /// <summary>
  13. /// Initializes a new instance of the <see cref="PluginManifest"/> class.
  14. /// </summary>
  15. public PluginManifest()
  16. {
  17. Category = string.Empty;
  18. Changelog = string.Empty;
  19. Description = string.Empty;
  20. Status = PluginStatus.Active;
  21. Id = Guid.Empty;
  22. Name = string.Empty;
  23. Owner = string.Empty;
  24. Overview = string.Empty;
  25. TargetAbi = string.Empty;
  26. Version = string.Empty;
  27. AutoUpdate = true;
  28. }
  29. /// <summary>
  30. /// Gets or sets the category of the plugin.
  31. /// </summary>
  32. [JsonPropertyName("category")]
  33. public string Category { get; set; }
  34. /// <summary>
  35. /// Gets or sets the changelog information.
  36. /// </summary>
  37. [JsonPropertyName("changelog")]
  38. public string Changelog { get; set; }
  39. /// <summary>
  40. /// Gets or sets the description of the plugin.
  41. /// </summary>
  42. [JsonPropertyName("description")]
  43. public string Description { get; set; }
  44. /// <summary>
  45. /// Gets or sets the Global Unique Identifier for the plugin.
  46. /// </summary>
  47. [JsonPropertyName("guid")]
  48. public Guid Id { get; set; }
  49. /// <summary>
  50. /// Gets or sets the Name of the plugin.
  51. /// </summary>
  52. [JsonPropertyName("name")]
  53. public string Name { get; set; }
  54. /// <summary>
  55. /// Gets or sets an overview of the plugin.
  56. /// </summary>
  57. [JsonPropertyName("overview")]
  58. public string Overview { get; set; }
  59. /// <summary>
  60. /// Gets or sets the owner of the plugin.
  61. /// </summary>
  62. [JsonPropertyName("owner")]
  63. public string Owner { get; set; }
  64. /// <summary>
  65. /// Gets or sets the compatibility version for the plugin.
  66. /// </summary>
  67. [JsonPropertyName("targetAbi")]
  68. public string TargetAbi { get; set; }
  69. /// <summary>
  70. /// Gets or sets the timestamp of the plugin.
  71. /// </summary>
  72. [JsonPropertyName("timestamp")]
  73. public DateTime Timestamp { get; set; }
  74. /// <summary>
  75. /// Gets or sets the Version number of the plugin.
  76. /// </summary>
  77. [JsonPropertyName("version")]
  78. public string Version { get; set; }
  79. /// <summary>
  80. /// Gets or sets a value indicating the operational status of this plugin.
  81. /// </summary>
  82. [JsonPropertyName("status")]
  83. public PluginStatus Status { get; set; }
  84. /// <summary>
  85. /// Gets or sets a value indicating whether this plugin should automatically update.
  86. /// </summary>
  87. [JsonPropertyName("autoUpdate")]
  88. public bool AutoUpdate { get; set; }
  89. /// <summary>
  90. /// Gets or sets the ImagePath
  91. /// Gets or sets a value indicating whether this plugin has an image.
  92. /// Image must be located in the local plugin folder.
  93. /// </summary>
  94. [JsonPropertyName("imagePath")]
  95. public string? ImagePath { get; set; }
  96. }
  97. }