Implemented UI plugin downloading

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-09-03 15:12:02 -04:00
parent 4500f1d11b
commit 26aef6b082
11 changed files with 118 additions and 28 deletions

View File

@@ -569,7 +569,7 @@ namespace MediaBrowser.ApiInteraction
/// <summary>
/// Gets a list of plugins installed on the server
/// </summary>
public async Task<PluginInfo[]> GetInstalledPlugins()
public async Task<PluginInfo[]> GetInstalledPluginsAsync()
{
string url = ApiUrl + "/plugins";
@@ -578,7 +578,17 @@ namespace MediaBrowser.ApiInteraction
return DeserializeFromStream<PluginInfo[]>(stream);
}
}
/// <summary>
/// Gets a list of plugins installed on the server
/// </summary>
public Task<Stream> GetPluginAssemblyAsync(PluginInfo plugin)
{
string url = ApiUrl + "/pluginassembly?assemblyfilename=" + plugin.AssemblyFileName;
return GetStreamAsync(url);
}
/// <summary>
/// Gets weather information for the default location as set in configuration
/// </summary>
@@ -655,7 +665,7 @@ namespace MediaBrowser.ApiInteraction
return GetStreamAsync(url);
}
private T DeserializeFromStream<T>(Stream stream)
{
return DeserializeFromStream<T>(stream, SerializationFormat);