removed commented code

This commit is contained in:
Claus Vium 2019-01-05 08:18:44 +01:00 committed by Bond-009
parent 801726ce38
commit e0e5a487c3

View File

@ -209,46 +209,7 @@ namespace MediaBrowser.Api
/// <returns>System.Object.</returns>
public async Task<object> Get(GetPlugins request)
{
// TODO This code can be reused for a proper Jellyfin plugin store (maybe). Remove/reuse when decided.
var result = _appHost.Plugins.OrderBy(p => p.Name).Select(p => p.GetPluginInfo()).ToArray();
// var requireAppStoreEnabled = request.IsAppStoreEnabled.HasValue && request.IsAppStoreEnabled.Value;
//
// // Don't fail just on account of image url's
// try
// {
// var packages = (await _installationManager.GetAvailablePackagesWithoutRegistrationInfo(CancellationToken.None));
//
// foreach (var plugin in result)
// {
// var pkg = packages.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.guid) && string.Equals(i.guid.Replace("-", string.Empty), plugin.Id.Replace("-", string.Empty), StringComparison.OrdinalIgnoreCase));
//
// if (pkg != null)
// {
// plugin.ImageUrl = pkg.thumbImage;
// }
// }
//
// if (requireAppStoreEnabled)
// {
// result = result
// .Where(plugin =>
// {
// var pkg = packages.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.guid) && new Guid(plugin.Id).Equals(new Guid(i.guid)));
// return pkg != null && pkg.enableInAppStore;
//
// })
// .ToArray();
// }
// }
// catch (Exception ex)
// {
// Logger.LogError(ex, "Error getting plugin list");
// // Play it safe here
// if (requireAppStoreEnabled)
// {
// result = new PluginInfo[] { };
// }
// }
var result = _appHost.Plugins.OrderBy(p => p.Name).Select(p => p.GetPluginInfo()).ToArray();
return ToOptimizedResult(result);
}