PluginManifest.cs 2.9 KB

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