From 5d748c0e9f1ad87bece090934c5da6c4edacb8f7 Mon Sep 17 00:00:00 2001 From: Greenback Date: Fri, 18 Dec 2020 20:52:44 +0000 Subject: [PATCH] Renamed to ImagePath --- Jellyfin.Api/Controllers/PluginsController.cs | 10 +++++----- MediaBrowser.Common/Plugins/LocalPlugin.cs | 2 +- MediaBrowser.Common/Plugins/PluginManifest.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Jellyfin.Api/Controllers/PluginsController.cs b/Jellyfin.Api/Controllers/PluginsController.cs index 1365764fba..365bb2248c 100644 --- a/Jellyfin.Api/Controllers/PluginsController.cs +++ b/Jellyfin.Api/Controllers/PluginsController.cs @@ -303,16 +303,16 @@ namespace Jellyfin.Api.Controllers return NotFound(); } - var imgPath = Path.Combine(plugin.Path, plugin.Manifest.ImageUrl ?? string.Empty); + var imagePath = Path.Combine(plugin.Path, plugin.Manifest.ImagePath ?? string.Empty); if (((ServerConfiguration)_config.CommonConfiguration).DisablePluginImages - || plugin.Manifest.ImageUrl == null - || !System.IO.File.Exists(imgPath)) + || plugin.Manifest.ImagePath == null + || !System.IO.File.Exists(imagePath)) { return NotFound(); } - imgPath = Path.Combine(plugin.Path, plugin.Manifest.ImageUrl); - return PhysicalFile(imgPath, MimeTypes.GetMimeType(imgPath)); + imagePath = Path.Combine(plugin.Path, plugin.Manifest.ImagePath); + return PhysicalFile(imagePath, MimeTypes.GetMimeType(imagePath)); } /// diff --git a/MediaBrowser.Common/Plugins/LocalPlugin.cs b/MediaBrowser.Common/Plugins/LocalPlugin.cs index 40ecb0a67b..23b6cfa81a 100644 --- a/MediaBrowser.Common/Plugins/LocalPlugin.cs +++ b/MediaBrowser.Common/Plugins/LocalPlugin.cs @@ -110,7 +110,7 @@ namespace MediaBrowser.Common.Plugins { var inst = Instance?.GetPluginInfo() ?? new PluginInfo(Manifest.Name, Version, Manifest.Description, Manifest.Id, true); inst.Status = Manifest.Status; - inst.HasImage = !string.IsNullOrEmpty(Manifest.ImageUrl); + inst.HasImage = !string.IsNullOrEmpty(Manifest.ImagePath); return inst; } diff --git a/MediaBrowser.Common/Plugins/PluginManifest.cs b/MediaBrowser.Common/Plugins/PluginManifest.cs index 39ee450a6e..755ccafda1 100644 --- a/MediaBrowser.Common/Plugins/PluginManifest.cs +++ b/MediaBrowser.Common/Plugins/PluginManifest.cs @@ -80,6 +80,6 @@ namespace MediaBrowser.Common.Plugins /// Gets or sets a value indicating whether this plugin has an image. /// Image must be located in the local plugin folder. /// - public string? ImageUrl { get; set; } + public string? ImagePath { get; set; } } }