mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 18:53:27 +01:00
Initial upload
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#nullable disable
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
@@ -6,34 +9,46 @@ namespace MediaBrowser.Model.Plugins
|
||||
/// </summary>
|
||||
public class PluginInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PluginInfo"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The plugin name.</param>
|
||||
/// <param name="version">The plugin <see cref="Version"/>.</param>
|
||||
/// <param name="description">The plugin description.</param>
|
||||
/// <param name="id">The <see cref="Guid"/>.</param>
|
||||
/// <param name="canUninstall">True if this plugin can be uninstalled.</param>
|
||||
public PluginInfo(string name, Version version, string description, Guid id, bool canUninstall)
|
||||
{
|
||||
Name = name;
|
||||
Version = version?.ToString() ?? throw new ArgumentNullException(nameof(version));
|
||||
Description = description;
|
||||
Id = id.ToString();
|
||||
CanUninstall = canUninstall;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the configuration file.
|
||||
/// </summary>
|
||||
/// <value>The name of the configuration file.</value>
|
||||
public string ConfigurationFileName { get; set; }
|
||||
public string? ConfigurationFileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the unique id.
|
||||
/// </summary>
|
||||
/// <value>The unique id.</value>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -42,9 +57,13 @@ namespace MediaBrowser.Model.Plugins
|
||||
public bool CanUninstall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the image URL.
|
||||
/// Gets or sets a value indicating whether this plugin has a valid image.
|
||||
/// </summary>
|
||||
/// <value>The image URL.</value>
|
||||
public string ImageUrl { get; set; }
|
||||
public bool HasImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the status of the plugin.
|
||||
/// </summary>
|
||||
public PluginStatus Status { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
17
MediaBrowser.Model/Plugins/PluginStatus.cs
Normal file
17
MediaBrowser.Model/Plugins/PluginStatus.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||
#pragma warning disable SA1602 // Enumeration items should be documented
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Plugin load status.
|
||||
/// </summary>
|
||||
public enum PluginStatus
|
||||
{
|
||||
RestartRequired = 1,
|
||||
Active = 0,
|
||||
Disabled = -1,
|
||||
NotSupported = -2,
|
||||
Malfunction = -3,
|
||||
Superceded = -4
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user