mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
65cd3ed597
This makes resolving dependencies from the container much easier as you cannot resolve with primitives parameters in a way that is any more readable. The aim of this commit is to change as little as possible with the end result, loggers that were newed up for the parent object were given the same name. Objects that used the base or app loggers, were given a new logger with an appropriate name. Also removed some unused dependencies.
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MediaBrowser.Controller.Chapters;
|
|
using MediaBrowser.Controller.Configuration;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Controller.Persistence;
|
|
using MediaBrowser.Model.Entities;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace MediaBrowser.Providers.Chapters
|
|
{
|
|
public class ChapterManager : IChapterManager
|
|
{
|
|
private readonly ILibraryManager _libraryManager;
|
|
private readonly ILogger _logger;
|
|
private readonly IServerConfigurationManager _config;
|
|
private readonly IItemRepository _itemRepo;
|
|
|
|
public ChapterManager(
|
|
ILibraryManager libraryManager,
|
|
ILoggerFactory loggerFactory,
|
|
IServerConfigurationManager config,
|
|
IItemRepository itemRepo)
|
|
{
|
|
_libraryManager = libraryManager;
|
|
_logger = loggerFactory.CreateLogger(nameof(ChapterManager));
|
|
_config = config;
|
|
_itemRepo = itemRepo;
|
|
}
|
|
|
|
public void SaveChapters(string itemId, List<ChapterInfo> chapters)
|
|
{
|
|
_itemRepo.SaveChapters(new Guid(itemId), chapters);
|
|
}
|
|
}
|
|
}
|