mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 07:46:32 +01:00
Split BaseItemRepository and IItemRepository
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks;
|
||||
/// </summary>
|
||||
public partial class AudioNormalizationTask : IScheduledTask
|
||||
{
|
||||
private readonly IItemRepository _itemRepository;
|
||||
private readonly IItemPersistenceService _persistenceService;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
private readonly IApplicationPaths _applicationPaths;
|
||||
@@ -38,21 +38,21 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AudioNormalizationTask"/> class.
|
||||
/// </summary>
|
||||
/// <param name="itemRepository">Instance of the <see cref="IItemRepository"/> interface.</param>
|
||||
/// <param name="persistenceService">Instance of the <see cref="IItemPersistenceService"/> interface.</param>
|
||||
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
|
||||
/// <param name="mediaEncoder">Instance of the <see cref="IMediaEncoder"/> interface.</param>
|
||||
/// <param name="applicationPaths">Instance of the <see cref="IApplicationPaths"/> interface.</param>
|
||||
/// <param name="localizationManager">Instance of the <see cref="ILocalizationManager"/> interface.</param>
|
||||
/// <param name="logger">Instance of the <see cref="ILogger{AudioNormalizationTask}"/> interface.</param>
|
||||
public AudioNormalizationTask(
|
||||
IItemRepository itemRepository,
|
||||
IItemPersistenceService persistenceService,
|
||||
ILibraryManager libraryManager,
|
||||
IMediaEncoder mediaEncoder,
|
||||
IApplicationPaths applicationPaths,
|
||||
ILocalizationManager localizationManager,
|
||||
ILogger<AudioNormalizationTask> logger)
|
||||
{
|
||||
_itemRepository = itemRepository;
|
||||
_persistenceService = persistenceService;
|
||||
_libraryManager = libraryManager;
|
||||
_mediaEncoder = mediaEncoder;
|
||||
_applicationPaths = applicationPaths;
|
||||
@@ -138,7 +138,7 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
{
|
||||
if (toSaveDbItems.Count > 1)
|
||||
{
|
||||
_itemRepository.SaveItems(toSaveDbItems, cancellationToken);
|
||||
_persistenceService.SaveItems(toSaveDbItems, cancellationToken);
|
||||
toSaveDbItems.Clear();
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
|
||||
if (toSaveDbItems.Count > 1)
|
||||
{
|
||||
_itemRepository.SaveItems(toSaveDbItems, cancellationToken);
|
||||
_persistenceService.SaveItems(toSaveDbItems, cancellationToken);
|
||||
toSaveDbItems.Clear();
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
{
|
||||
if (toSaveDbItems.Count > 1)
|
||||
{
|
||||
_itemRepository.SaveItems(toSaveDbItems, cancellationToken);
|
||||
_persistenceService.SaveItems(toSaveDbItems, cancellationToken);
|
||||
toSaveDbItems.Clear();
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public partial class AudioNormalizationTask : IScheduledTask
|
||||
|
||||
if (toSaveDbItems.Count > 1)
|
||||
{
|
||||
_itemRepository.SaveItems(toSaveDbItems, cancellationToken);
|
||||
_persistenceService.SaveItems(toSaveDbItems, cancellationToken);
|
||||
}
|
||||
|
||||
// Update progress
|
||||
|
||||
Reference in New Issue
Block a user