mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-27 01:50:53 +01:00
Renamed Guid property to Id
This commit is contained in:
@@ -48,7 +48,7 @@ namespace MediaBrowser.Common.Plugins
|
||||
var assemblyFilePath = assembly.Location;
|
||||
|
||||
var dataFolderPath = Path.Combine(ApplicationPaths.PluginsPath, Path.GetFileNameWithoutExtension(assemblyFilePath));
|
||||
if (!Directory.Exists(dataFolderPath))
|
||||
if (!Directory.Exists(dataFolderPath) && Version != null)
|
||||
{
|
||||
// Try again with the version number appended to the folder name.
|
||||
dataFolderPath = dataFolderPath + "_" + Version.ToString();
|
||||
@@ -137,7 +137,20 @@ namespace MediaBrowser.Common.Plugins
|
||||
/// Gets the full path to the configuration file.
|
||||
/// </summary>
|
||||
/// <value>The configuration file path.</value>
|
||||
public string ConfigurationFilePath { get; }
|
||||
public string ConfigurationFilePath
|
||||
{
|
||||
get
|
||||
{
|
||||
var dataFolderPath = Path.Combine(ApplicationPaths.PluginsPath, Path.GetFileNameWithoutExtension(AssemblyFilePath));
|
||||
if (!Directory.Exists(dataFolderPath) && Version != null)
|
||||
{
|
||||
// Try again with the version number appended to the folder name.
|
||||
return dataFolderPath + "_" + Version.ToString();
|
||||
}
|
||||
|
||||
return dataFolderPath;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the plugin configuration.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using MediaBrowser.Model.Plugins;
|
||||
|
||||
namespace MediaBrowser.Common.Plugins
|
||||
@@ -32,7 +30,7 @@ namespace MediaBrowser.Common.Plugins
|
||||
/// <summary>
|
||||
/// Gets the plugin id.
|
||||
/// </summary>
|
||||
public Guid Id => Manifest.Guid;
|
||||
public Guid Id => Manifest.Id;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the plugin name.
|
||||
@@ -110,7 +108,7 @@ namespace MediaBrowser.Common.Plugins
|
||||
/// <returns>A <see cref="PluginInfo"/> instance containing the information.</returns>
|
||||
public PluginInfo GetPluginInfo()
|
||||
{
|
||||
var inst = Instance?.GetPluginInfo() ?? new PluginInfo(Manifest.Name, Version, Manifest.Description, Manifest.Guid, true);
|
||||
var inst = Instance?.GetPluginInfo() ?? new PluginInfo(Manifest.Name, Version, Manifest.Description, Manifest.Id, true);
|
||||
inst.Status = Manifest.Status;
|
||||
inst.HasImage = !string.IsNullOrEmpty(Manifest.ImageUrl);
|
||||
return inst;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using MediaBrowser.Model.Plugins;
|
||||
|
||||
namespace MediaBrowser.Common.Plugins
|
||||
@@ -27,9 +28,8 @@ namespace MediaBrowser.Common.Plugins
|
||||
/// <summary>
|
||||
/// Gets or sets the Global Unique Identifier for the plugin.
|
||||
/// </summary>
|
||||
#pragma warning disable CA1720 // Identifier contains type name
|
||||
public Guid Guid { get; set; }
|
||||
#pragma warning restore CA1720 // Identifier contains type name
|
||||
[JsonPropertyName("Guid")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Name of the plugin.
|
||||
|
||||
Reference in New Issue
Block a user