update live tv data transfer

This commit is contained in:
Luke Pulverenti
2017-08-19 15:43:35 -04:00
parent bd31c0175d
commit 1ad990ad72
175 changed files with 997 additions and 1351 deletions

View File

@@ -23,7 +23,7 @@ namespace MediaBrowser.Api
/// </summary>
[Route("/Plugins", "GET", Summary = "Gets a list of currently installed plugins")]
[Authenticated]
public class GetPlugins : IReturn<List<PluginInfo>>
public class GetPlugins : IReturn<PluginInfo[]>
{
public bool? IsAppStoreEnabled { get; set; }
}
@@ -195,14 +195,13 @@ namespace MediaBrowser.Api
/// <returns>System.Object.</returns>
public async Task<object> Get(GetPlugins request)
{
var result = _appHost.Plugins.OrderBy(p => p.Name).Select(p => p.GetPluginInfo()).ToList();
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))
.ToList();
var packages = (await _installationManager.GetAvailablePackagesWithoutRegistrationInfo(CancellationToken.None));
foreach (var plugin in result)
{
@@ -223,7 +222,7 @@ namespace MediaBrowser.Api
return pkg != null && pkg.enableInAppStore;
})
.ToList();
.ToArray();
}
}
catch
@@ -232,7 +231,7 @@ namespace MediaBrowser.Api
// Play it safe here
if (requireAppStoreEnabled)
{
result = new List<PluginInfo>();
result = new PluginInfo[] { };
}
}