using System; using System.Collections.Generic; using System.Text.Json.Serialization; using MediaBrowser.Model.Plugins; namespace MediaBrowser.Common.Plugins { /// /// Defines a Plugin manifest file. /// public class PluginManifest { /// /// Initializes a new instance of the class. /// public PluginManifest() { Category = string.Empty; Changelog = string.Empty; Description = string.Empty; Id = Guid.Empty; Name = string.Empty; Owner = string.Empty; Overview = string.Empty; TargetAbi = string.Empty; Version = string.Empty; Assemblies = Array.Empty(); } /// /// Gets or sets the category of the plugin. /// [JsonPropertyName("category")] public string Category { get; set; } /// /// Gets or sets the changelog information. /// [JsonPropertyName("changelog")] public string Changelog { get; set; } /// /// Gets or sets the description of the plugin. /// [JsonPropertyName("description")] public string Description { get; set; } /// /// Gets or sets the Global Unique Identifier for the plugin. /// [JsonPropertyName("guid")] public Guid Id { get; set; } /// /// Gets or sets the Name of the plugin. /// [JsonPropertyName("name")] public string Name { get; set; } /// /// Gets or sets an overview of the plugin. /// [JsonPropertyName("overview")] public string Overview { get; set; } /// /// Gets or sets the owner of the plugin. /// [JsonPropertyName("owner")] public string Owner { get; set; } /// /// Gets or sets the compatibility version for the plugin. /// [JsonPropertyName("targetAbi")] public string TargetAbi { get; set; } /// /// Gets or sets the timestamp of the plugin. /// [JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } /// /// Gets or sets the Version number of the plugin. /// [JsonPropertyName("version")] public string Version { get; set; } /// /// Gets or sets a value indicating the operational status of this plugin. /// [JsonPropertyName("status")] public PluginStatus Status { get; set; } /// /// Gets or sets a value indicating whether this plugin should automatically update. /// [JsonPropertyName("autoUpdate")] public bool AutoUpdate { get; set; } = true; // DO NOT MOVE THIS INTO THE CONSTRUCTOR. /// /// Gets or sets the ImagePath /// Gets or sets a value indicating whether this plugin has an image. /// Image must be located in the local plugin folder. /// [JsonPropertyName("imagePath")] public string? ImagePath { get; set; } /// /// Gets or sets the collection of assemblies that should be loaded. /// Paths are considered relative to the plugin folder. /// [JsonPropertyName("assemblies")] public IReadOnlyList Assemblies { get; set; } } }