2
0

ChapterManager.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using MediaBrowser.Common.Configuration;
  2. using MediaBrowser.Common.Extensions;
  3. using MediaBrowser.Controller.Chapters;
  4. using MediaBrowser.Controller.Configuration;
  5. using MediaBrowser.Controller.Entities;
  6. using MediaBrowser.Controller.Entities.Movies;
  7. using MediaBrowser.Controller.Entities.TV;
  8. using MediaBrowser.Controller.Library;
  9. using MediaBrowser.Controller.Persistence;
  10. using MediaBrowser.Controller.Providers;
  11. using MediaBrowser.Model.Configuration;
  12. using MediaBrowser.Model.Entities;
  13. using Microsoft.Extensions.Logging;
  14. using System;
  15. using System.Collections.Generic;
  16. using System.Threading;
  17. using System.Threading.Tasks;
  18. namespace MediaBrowser.Providers.Chapters
  19. {
  20. public class ChapterManager : IChapterManager
  21. {
  22. private readonly ILibraryManager _libraryManager;
  23. private readonly ILogger _logger;
  24. private readonly IServerConfigurationManager _config;
  25. private readonly IItemRepository _itemRepo;
  26. public ChapterManager(ILibraryManager libraryManager, ILogger logger, IServerConfigurationManager config, IItemRepository itemRepo)
  27. {
  28. _libraryManager = libraryManager;
  29. _logger = logger;
  30. _config = config;
  31. _itemRepo = itemRepo;
  32. }
  33. public void SaveChapters(string itemId, List<ChapterInfo> chapters)
  34. {
  35. _itemRepo.SaveChapters(new Guid(itemId), chapters);
  36. }
  37. }
  38. }