|
@@ -1,7 +1,7 @@
|
|
|
#nullable enable
|
|
|
+
|
|
|
using System;
|
|
|
using System.Text.Json.Serialization;
|
|
|
-using MediaBrowser.Common.Json.Converters;
|
|
|
using MediaBrowser.Model.Plugins;
|
|
|
|
|
|
namespace MediaBrowser.Common.Plugins
|
|
@@ -11,54 +11,71 @@ namespace MediaBrowser.Common.Plugins
|
|
|
/// </summary>
|
|
|
public class PluginManifest
|
|
|
{
|
|
|
+ /// <summary>
|
|
|
+ /// Initializes a new instance of the <see cref="PluginManifest"/> class.
|
|
|
+ /// </summary>
|
|
|
+ public PluginManifest()
|
|
|
+ {
|
|
|
+ Category = string.Empty;
|
|
|
+ Changelog = string.Empty;
|
|
|
+ Description = string.Empty;
|
|
|
+ Status = PluginStatus.Active;
|
|
|
+ Id = Guid.Empty;
|
|
|
+ Name = string.Empty;
|
|
|
+ Owner = string.Empty;
|
|
|
+ Overview = string.Empty;
|
|
|
+ TargetAbi = string.Empty;
|
|
|
+ Version = string.Empty;
|
|
|
+ AutoUpdate = true;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// Gets or sets the category of the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("category")]
|
|
|
- public string Category { get; set; } = string.Empty;
|
|
|
+ public string Category { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the changelog information.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("changelog")]
|
|
|
- public string Changelog { get; set; } = string.Empty;
|
|
|
+ public string Changelog { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the description of the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("description")]
|
|
|
- public string Description { get; set; } = string.Empty;
|
|
|
+ public string Description { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the Global Unique Identifier for the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("guid")]
|
|
|
- [JsonConverter(typeof(JsonGuidDashConverter))]
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the Name of the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("name")]
|
|
|
- public string Name { get; set; } = string.Empty;
|
|
|
+ public string Name { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets an overview of the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("overview")]
|
|
|
- public string Overview { get; set; } = string.Empty;
|
|
|
+ public string Overview { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the owner of the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("owner")]
|
|
|
- public string Owner { get; set; } = string.Empty;
|
|
|
+ public string Owner { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the compatibility version for the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("targetAbi")]
|
|
|
- public string TargetAbi { get; set; } = string.Empty;
|
|
|
+ public string TargetAbi { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets the timestamp of the plugin.
|
|
@@ -70,7 +87,7 @@ namespace MediaBrowser.Common.Plugins
|
|
|
/// Gets or sets the Version number of the plugin.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("version")]
|
|
|
- public string Version { get; set; } = string.Empty;
|
|
|
+ public string Version { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Gets or sets a value indicating the operational status of this plugin.
|
|
@@ -82,9 +99,10 @@ namespace MediaBrowser.Common.Plugins
|
|
|
/// Gets or sets a value indicating whether this plugin should automatically update.
|
|
|
/// </summary>
|
|
|
[JsonPropertyName("autoUpdate")]
|
|
|
- public bool AutoUpdate { get; set; } = true;
|
|
|
+ public bool AutoUpdate { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
+ /// 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.
|
|
|
/// </summary>
|