diff options
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs | 15 | ||||
| -rw-r--r-- | MediaBrowser.Api/MediaBrowser.Api.csproj | 1 | ||||
| -rw-r--r-- | MediaBrowser.Api/Plugin.cs | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs b/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs new file mode 100644 index 0000000000..175876b4ca --- /dev/null +++ b/MediaBrowser.Api/HttpHandlers/ServerConfigurationHandler.cs @@ -0,0 +1,15 @@ +using System.Threading.Tasks;
+using MediaBrowser.Common.Net.Handlers;
+using MediaBrowser.Controller;
+using MediaBrowser.Model.Configuration;
+
+namespace MediaBrowser.Api.HttpHandlers
+{
+ class ServerConfigurationHandler : BaseSerializationHandler<ServerConfiguration>
+ {
+ protected override Task<ServerConfiguration> GetObjectToSerialize()
+ {
+ return Task.FromResult<ServerConfiguration>(Kernel.Instance.Configuration);
+ }
+ }
+}
diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index 5d32210938..89bb5adc91 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -65,6 +65,7 @@ <Compile Include="HttpHandlers\PersonHandler.cs" />
<Compile Include="HttpHandlers\PluginConfigurationHandler.cs" />
<Compile Include="HttpHandlers\PluginsHandler.cs" />
+ <Compile Include="HttpHandlers\ServerConfigurationHandler.cs" />
<Compile Include="HttpHandlers\StudioHandler.cs" />
<Compile Include="HttpHandlers\StudiosHandler.cs" />
<Compile Include="HttpHandlers\UsersHandler.cs" />
diff --git a/MediaBrowser.Api/Plugin.cs b/MediaBrowser.Api/Plugin.cs index 467b30ef15..f13b9efb33 100644 --- a/MediaBrowser.Api/Plugin.cs +++ b/MediaBrowser.Api/Plugin.cs @@ -105,6 +105,10 @@ namespace MediaBrowser.Api {
return new WeatherHandler();
}
+ else if (localPath.EndsWith("/api/cerverconfiguration", StringComparison.OrdinalIgnoreCase))
+ {
+ return new ServerConfigurationHandler();
+ }
return null;
}
|
