diff --git a/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs b/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs index ab2efc9496..acfa5ebeb4 100644 --- a/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs +++ b/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs @@ -21,15 +21,10 @@ namespace MediaBrowser.Api.HttpHandlers Name = p.Name, Enabled = p.Enabled, DownloadToUI = p.DownloadToUI, - Version = p.Version + Version = p.Version.ToString() }; }); - if (QueryString["uionly"] == "1") - { - plugins = plugins.Where(p => p.DownloadToUI); - } - return Task.FromResult>(plugins); } } diff --git a/MediaBrowser.ApiInteraction/ApiClient.cs b/MediaBrowser.ApiInteraction/ApiClient.cs index 3de40f6a86..621c700cf5 100644 --- a/MediaBrowser.ApiInteraction/ApiClient.cs +++ b/MediaBrowser.ApiInteraction/ApiClient.cs @@ -566,6 +566,19 @@ namespace MediaBrowser.ApiInteraction } } + /// + /// Gets a list of plugins installed on the server + /// + public async Task GetInstalledPlugins() + { + string url = ApiUrl + "/plugins"; + + using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) + { + return DeserializeFromStream(stream); + } + } + /// /// Gets weather information for the default location as set in configuration /// diff --git a/MediaBrowser.Model/DTO/PluginInfo.cs b/MediaBrowser.Model/DTO/PluginInfo.cs index 4819296f4b..7ddadbc932 100644 --- a/MediaBrowser.Model/DTO/PluginInfo.cs +++ b/MediaBrowser.Model/DTO/PluginInfo.cs @@ -22,6 +22,6 @@ namespace MediaBrowser.Model.DTO public DateTime ConfigurationDateLastModified { get; set; } [ProtoMember(5)] - public Version Version { get; set; } + public string Version { get; set; } } }