PluginManifest.cs 3.3 KB

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