Add PostgreSQL provider and code cleanup
Added Jellyfin.Database.Providers.Postgres project and integrated Npgsql packages for PostgreSQL support. Updated solution and test project references. Refactored code for clarity and performance, including improved string handling, log formatting, and plugin management. Enhanced .editorconfig rules and fixed minor test issues. Added publishing profiles and updated web server setup references. Cleaned up assembly info and cache files. Now able to successfully build solution
This commit is contained in:
@@ -47,8 +47,6 @@ namespace Emby.Server.Implementations.Plugins
|
||||
private readonly List<LocalPlugin> _plugins;
|
||||
private readonly Version _minimumVersion;
|
||||
|
||||
private IHttpClientFactory? _httpClientFactory;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PluginManager"/> class.
|
||||
/// </summary>
|
||||
@@ -92,10 +90,7 @@ namespace Emby.Server.Implementations.Plugins
|
||||
|
||||
private IHttpClientFactory HttpClientFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
return _httpClientFactory ??= _appHost.Resolve<IHttpClientFactory>();
|
||||
}
|
||||
get => field ??= _appHost.Resolve<IHttpClientFactory>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -125,7 +120,7 @@ namespace Emby.Server.Implementations.Plugins
|
||||
{
|
||||
UpdatePluginSupersededStatus(plugin);
|
||||
|
||||
if (plugin.IsEnabledAndSupported == false)
|
||||
if (!plugin.IsEnabledAndSupported)
|
||||
{
|
||||
_logger.LogInformation("Skipping disabled plugin {Version} of {Name} ", plugin.Version, plugin.Name);
|
||||
continue;
|
||||
@@ -698,7 +693,7 @@ namespace Emby.Server.Implementations.Plugins
|
||||
targetAbi = _minimumVersion;
|
||||
}
|
||||
|
||||
if (!Version.TryParse(manifest.Version, out version))
|
||||
if (!Version.TryParse(manifest.Version, out _))
|
||||
{
|
||||
manifest.Version = _minimumVersion.ToString();
|
||||
}
|
||||
@@ -710,7 +705,7 @@ namespace Emby.Server.Implementations.Plugins
|
||||
// No metafile, so lets see if the folder is versioned.
|
||||
// TODO: Phase this support out in future versions.
|
||||
metafile = dir.Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries)[^1];
|
||||
int versionIndex = dir.LastIndexOf('_');
|
||||
int versionIndex = dir.LastIndexOf("_", StringComparison.Ordinal);
|
||||
if (versionIndex != -1)
|
||||
{
|
||||
// Get the version number from the filename if possible.
|
||||
|
||||
Reference in New Issue
Block a user