diff --git a/EmbyStat.Clients.Base/Http/BaseHttpClient.cs b/EmbyStat.Clients.Base/Http/BaseHttpClient.cs index b941bcf39..42e48d7e0 100644 --- a/EmbyStat.Clients.Base/Http/BaseHttpClient.cs +++ b/EmbyStat.Clients.Base/Http/BaseHttpClient.cs @@ -376,7 +376,7 @@ public int GetMovieCount(string parentId) { ParentId = parentId, Recursive = true, - IncludeItemTypes = new[] { nameof(Movie), nameof(BoxSet) }, + IncludeItemTypes = new[] { nameof(Movie) }, StartIndex = 0, Limit = 1, EnableTotalRecordCount = true diff --git a/EmbyStat.Common/Models/Net/BaseItemDto.cs b/EmbyStat.Common/Models/Net/BaseItemDto.cs index 3b7ec7e9f..03dfb7ea5 100644 --- a/EmbyStat.Common/Models/Net/BaseItemDto.cs +++ b/EmbyStat.Common/Models/Net/BaseItemDto.cs @@ -40,7 +40,7 @@ public class BaseItemDto public override string ToString() { - return $"id: {Id} - Name:{Name} - Type:{CollectionType.ToLibraryType()}"; + return $"id: {Id} - Name:{Name} - Type:{CollectionType.ToLibraryType()} - RawType:{CollectionType}"; } } } diff --git a/EmbyStat.Jobs/Jobs/Sync/MovieSyncJob.cs b/EmbyStat.Jobs/Jobs/Sync/MovieSyncJob.cs index 6cbd5e9d1..da3ad0776 100644 --- a/EmbyStat.Jobs/Jobs/Sync/MovieSyncJob.cs +++ b/EmbyStat.Jobs/Jobs/Sync/MovieSyncJob.cs @@ -70,23 +70,22 @@ public override async Task RunJobAsync() await LogInformation($"Found {libraries.Count} root items, getting ready for processing"); await LogProgress(15); - await ProcessMoviesAsync(libraries, cancellationToken); + await ProcessMoviesAsync(cancellationToken); await LogProgress(55); await CalculateStatistics(); await LogProgress(100); } - private async Task ProcessMoviesAsync(IEnumerable libraries, CancellationToken cancellationToken) + private async Task ProcessMoviesAsync(CancellationToken cancellationToken) { await LogInformation("Lets start processing movies"); _movieRepository.RemoveMovies(); - - var neededLibraries = libraries.Where(x => Settings.MovieLibraries.Any(y => y == x.Id)).ToList(); - var logIncrementBase = Math.Round(40 / (double)neededLibraries.Count, 1); - foreach (var library in neededLibraries) + + var logIncrementBase = Math.Round(40 / (double)Settings.MovieLibraries.Count, 1); + foreach (var libraryId in Settings.MovieLibraries) { - var collectionId = library.Id; + var collectionId = libraryId; var totalCount = await GetTotalLibraryMovieCount(collectionId); if (totalCount == 0) { @@ -94,7 +93,7 @@ private async Task ProcessMoviesAsync(IEnumerable libraries, Cancellati } var increment = logIncrementBase / (totalCount / (double)100); - await LogInformation($"Found {totalCount} movies in {library.Name} library"); + await LogInformation($"Found {totalCount} movies in (NAME REMOVED FOR DEV VERSION) library"); var processed = 0; var j = 0; const int limit = 100;