2020-12-06 23:48:54 +00:00
|
|
|
using System;
|
2020-12-18 20:37:35 +00:00
|
|
|
using System.Text.Json.Serialization;
|
2020-12-06 23:48:54 +00:00
|
|
|
using MediaBrowser.Model.Plugins;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Common.Plugins
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Defines a Plugin manifest file.
|
|
|
|
/// </summary>
|
|
|
|
public class PluginManifest
|
|
|
|
{
|
2020-12-22 14:07:01 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="PluginManifest"/> class.
|
|
|
|
/// </summary>
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-12-06 23:48:54 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the category of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("category")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Category { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the changelog information.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("changelog")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Changelog { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the description of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("description")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Description { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the Global Unique Identifier for the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("guid")]
|
2020-12-18 20:37:35 +00:00
|
|
|
public Guid Id { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the Name of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("name")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Name { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets an overview of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("overview")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Overview { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the owner of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("owner")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Owner { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the compatibility version for the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("targetAbi")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string TargetAbi { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the timestamp of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("timestamp")]
|
2020-12-06 23:48:54 +00:00
|
|
|
public DateTime Timestamp { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the Version number of the plugin.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("version")]
|
2020-12-22 14:07:01 +00:00
|
|
|
public string Version { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2020-12-17 13:37:13 +00:00
|
|
|
/// Gets or sets a value indicating the operational status of this plugin.
|
2020-12-06 23:48:54 +00:00
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("status")]
|
2020-12-06 23:48:54 +00:00
|
|
|
public PluginStatus Status { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether this plugin should automatically update.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("autoUpdate")]
|
2020-12-23 16:28:50 +00:00
|
|
|
public bool AutoUpdate { get; set; } = true; // DO NOT MOVE THIS INTO THE CONSTRUCTOR.
|
2020-12-06 23:48:54 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2020-12-22 14:07:01 +00:00
|
|
|
/// Gets or sets the ImagePath
|
2020-12-06 23:48:54 +00:00
|
|
|
/// Gets or sets a value indicating whether this plugin has an image.
|
|
|
|
/// Image must be located in the local plugin folder.
|
|
|
|
/// </summary>
|
2020-12-20 16:29:28 +00:00
|
|
|
[JsonPropertyName("imagePath")]
|
2020-12-18 20:52:44 +00:00
|
|
|
public string? ImagePath { get; set; }
|
2020-12-06 23:48:54 +00:00
|
|
|
}
|
|
|
|
}
|