mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
Added an api call to pull down user configuration
This commit is contained in:
parent
0a48b5e31a
commit
6c7175e33d
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Events;
|
||||
@@ -16,7 +17,7 @@ using MediaBrowser.Model.Users;
|
||||
|
||||
namespace MediaBrowser.Controller
|
||||
{
|
||||
public class Kernel : BaseKernel<ServerConfiguration>
|
||||
public class Kernel : BaseKernel<ServerConfigurationController, ServerConfiguration>
|
||||
{
|
||||
public static Kernel Instance { get; private set; }
|
||||
|
||||
@@ -249,7 +250,9 @@ namespace MediaBrowser.Controller
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
|
||||
return GetParentalAllowedRecursiveChildren(parent, userId).Where(i => !(i is Folder) && (now - i.DateCreated).TotalDays < Configuration.RecentItemDays);
|
||||
UserConfiguration config = ConfigurationController.GetUserConfiguration(userId);
|
||||
|
||||
return GetParentalAllowedRecursiveChildren(parent, userId).Where(i => !(i is Folder) && (now - i.DateCreated).TotalDays < config.RecentItemDays);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user