mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 09:44:47 +03:00
Moved some logic into domain entities, which is possible now that we're embracing DTO's
This commit is contained in:
parent
5c6ec34a9c
commit
ed018a8bea
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Common.Net.Handlers;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Model.DTO;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
||||
namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
@@ -13,8 +15,9 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;
|
||||
Guid userId = Guid.Parse(QueryString["userid"]);
|
||||
User user = Kernel.Instance.Users.First(u => u.Id == userId);
|
||||
|
||||
return Kernel.Instance.GetAllYears(parent, userId);
|
||||
return Kernel.Instance.GetAllYears(parent, user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user