mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-04 13:22:52 +01:00
Added an api call to pull down user configuration
This commit is contained in:
parent
0a48b5e31a
commit
6c7175e33d
18
MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.cs
Normal file
18
MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using MediaBrowser.Controller;
|
||||
|
||||
namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
public class UserConfigurationHandler : JsonHandler
|
||||
{
|
||||
protected override object ObjectToSerialize
|
||||
{
|
||||
get
|
||||
{
|
||||
Guid userId = Guid.Parse(QueryString["userid"]);
|
||||
|
||||
return Kernel.Instance.ConfigurationController.GetUserConfiguration(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,7 @@
|
||||
<Compile Include="HttpHandlers\RecentlyAddedItemsHandler.cs" />
|
||||
<Compile Include="HttpHandlers\StudioHandler.cs" />
|
||||
<Compile Include="HttpHandlers\StudiosHandler.cs" />
|
||||
<Compile Include="HttpHandlers\UserConfigurationHandler.cs" />
|
||||
<Compile Include="HttpHandlers\UsersHandler.cs" />
|
||||
<Compile Include="ImageProcessor.cs" />
|
||||
<Compile Include="HttpHandlers\MediaHandler.cs" />
|
||||
|
||||
@@ -71,6 +71,10 @@ namespace MediaBrowser.Api
|
||||
{
|
||||
handler = new InProgressItemsHandler();
|
||||
}
|
||||
else if (localPath.EndsWith("/api/userconfiguration", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
handler = new UserConfigurationHandler();
|
||||
}
|
||||
|
||||
if (handler != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user