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