mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-20 15:55:25 +03:00
* Add support for multi segment base urls
* Make baseurl case-insensitive
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Api.UserLibrary
|
||||
{
|
||||
@@ -19,37 +20,47 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
public abstract class BaseItemsByNameService<TItemType> : BaseApiService
|
||||
where TItemType : BaseItem, IItemByName
|
||||
{
|
||||
/// <summary>
|
||||
/// The _user manager
|
||||
/// </summary>
|
||||
protected readonly IUserManager UserManager;
|
||||
/// <summary>
|
||||
/// The library manager
|
||||
/// </summary>
|
||||
protected readonly ILibraryManager LibraryManager;
|
||||
protected readonly IUserDataManager UserDataRepository;
|
||||
protected readonly IItemRepository ItemRepository;
|
||||
protected IDtoService DtoService { get; private set; }
|
||||
protected IAuthorizationContext AuthorizationContext { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseItemsByNameService{TItemType}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="userManager">The user manager.</param>
|
||||
/// <param name="libraryManager">The library manager.</param>
|
||||
/// <param name="userDataRepository">The user data repository.</param>
|
||||
/// <param name="itemRepository">The item repository.</param>
|
||||
/// <param name="dtoService">The dto service.</param>
|
||||
protected BaseItemsByNameService(IUserManager userManager, ILibraryManager libraryManager, IUserDataManager userDataRepository, IItemRepository itemRepository, IDtoService dtoService, IAuthorizationContext authorizationContext)
|
||||
protected BaseItemsByNameService(
|
||||
ILogger logger,
|
||||
IServerConfigurationManager serverConfigurationManager,
|
||||
IHttpResultFactory httpResultFactory,
|
||||
IUserManager userManager,
|
||||
ILibraryManager libraryManager,
|
||||
IUserDataManager userDataRepository,
|
||||
IDtoService dtoService,
|
||||
IAuthorizationContext authorizationContext)
|
||||
: base(logger, serverConfigurationManager, httpResultFactory)
|
||||
{
|
||||
UserManager = userManager;
|
||||
LibraryManager = libraryManager;
|
||||
UserDataRepository = userDataRepository;
|
||||
ItemRepository = itemRepository;
|
||||
DtoService = dtoService;
|
||||
AuthorizationContext = authorizationContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the _user manager.
|
||||
/// </summary>
|
||||
protected IUserManager UserManager { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the library manager
|
||||
/// </summary>
|
||||
protected ILibraryManager LibraryManager { get; }
|
||||
|
||||
protected IUserDataManager UserDataRepository { get; }
|
||||
|
||||
protected IDtoService DtoService { get; }
|
||||
|
||||
protected IAuthorizationContext AuthorizationContext { get; }
|
||||
|
||||
protected BaseItem GetParentItem(GetItemsByName request)
|
||||
{
|
||||
BaseItem parentItem;
|
||||
|
||||
Reference in New Issue
Block a user