PluginManifest.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. Id = Guid.Empty;
  21. Name = string.Empty;
  22. Owner = string.Empty;
  23. Overview = string.Empty;
  24. TargetAbi = string.Empty;
  25. Version = string.Empty;
  26. }
  27. /// <summary>
  28. /// Gets or sets the category of the plugin.
  29. /// </summary>
  30. [JsonPropertyName("category")]
  31. public string Category { get; set; }
  32. /// <summary>
  33. /// Gets or sets the changelog information.
  34. /// </summary>
  35. [JsonPropertyName("changelog")]
  36. public string Changelog { get; set; }
  37. /// <summary>
  38. /// Gets or sets the description of the plugin.
  39. /// </summary>
  40. [JsonPropertyName("description")]
  41. public string Description { get; set; }
  42. /// <summary>
  43. /// Gets or sets the Global Unique Identifier for the plugin.
  44. /// </summary>
  45. [JsonPropertyName("guid")]
  46. public Guid Id { get; set; }
  47. /// <summary>
  48. /// Gets or sets the Name of the plugin.
  49. /// </summary>
  50. [JsonPropertyName("name")]
  51. public string Name { get; set; }
  52. /// <summary>
  53. /// Gets or sets an overview of the plugin.
  54. /// </summary>
  55. [JsonPropertyName("overview")]
  56. public string Overview { get; set; }
  57. /// <summary>
  58. /// Gets or sets the owner of the plugin.
  59. /// </summary>
  60. [JsonPropertyName("owner")]
  61. public string Owner { get; set; }
  62. /// <summary>
  63. /// Gets or sets the compatibility version for the plugin.
  64. /// </summary>
  65. [JsonPropertyName("targetAbi")]
  66. public string TargetAbi { get; set; }
  67. /// <summary>
  68. /// Gets or sets the timestamp of the plugin.
  69. /// </summary>
  70. [JsonPropertyName("timestamp")]
  71. public DateTime Timestamp { get; set; }
  72. /// <summary>
  73. /// Gets or sets the Version number of the plugin.
  74. /// </summary>
  75. [JsonPropertyName("version")]
  76. public string Version { get; set; }
  77. /// <summary>
  78. /// Gets or sets a value indicating the operational status of this plugin.
  79. /// </summary>
  80. [JsonPropertyName("status")]
  81. public PluginStatus Status { get; set; }
  82. /// <summary>
  83. /// Gets or sets a value indicating whether this plugin should automatically update.
  84. /// </summary>
  85. [JsonPropertyName("autoUpdate")]
  86. public bool AutoUpdate { get; set; } = true; // DO NOT MOVE THIS INTO THE CONSTRUCTOR.
  87. /// <summary>
  88. /// Gets or sets the ImagePath
  89. /// Gets or sets a value indicating whether this plugin has an image.
  90. /// Image must be located in the local plugin folder.
  91. /// </summary>
  92. [JsonPropertyName("imagePath")]
  93. public string? ImagePath { get; set; }
  94. }
  95. }