mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 21:54:26 -04:00
Renamed to ImagePath
This commit is contained in:
parent
ce19f2be55
commit
5d748c0e9f
@ -303,16 +303,16 @@ namespace Jellyfin.Api.Controllers
|
|||||||
return NotFound();
|
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
|
if (((ServerConfiguration)_config.CommonConfiguration).DisablePluginImages
|
||||||
|| plugin.Manifest.ImageUrl == null
|
|| plugin.Manifest.ImagePath == null
|
||||||
|| !System.IO.File.Exists(imgPath))
|
|| !System.IO.File.Exists(imagePath))
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
imgPath = Path.Combine(plugin.Path, plugin.Manifest.ImageUrl);
|
imagePath = Path.Combine(plugin.Path, plugin.Manifest.ImagePath);
|
||||||
return PhysicalFile(imgPath, MimeTypes.GetMimeType(imgPath));
|
return PhysicalFile(imagePath, MimeTypes.GetMimeType(imagePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -110,7 +110,7 @@ namespace MediaBrowser.Common.Plugins
|
|||||||
{
|
{
|
||||||
var inst = Instance?.GetPluginInfo() ?? new PluginInfo(Manifest.Name, Version, Manifest.Description, Manifest.Id, true);
|
var inst = Instance?.GetPluginInfo() ?? new PluginInfo(Manifest.Name, Version, Manifest.Description, Manifest.Id, true);
|
||||||
inst.Status = Manifest.Status;
|
inst.Status = Manifest.Status;
|
||||||
inst.HasImage = !string.IsNullOrEmpty(Manifest.ImageUrl);
|
inst.HasImage = !string.IsNullOrEmpty(Manifest.ImagePath);
|
||||||
return inst;
|
return inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +80,6 @@ namespace MediaBrowser.Common.Plugins
|
|||||||
/// Gets or sets a value indicating whether this plugin has an image.
|
/// Gets or sets a value indicating whether this plugin has an image.
|
||||||
/// Image must be located in the local plugin folder.
|
/// Image must be located in the local plugin folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? ImageUrl { get; set; }
|
public string? ImagePath { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user