Media-Cleaner-Homepage-and-Api #7
@@ -19,7 +19,8 @@ public class MovieHelper(ILogger logger)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(movie, "IsMovieStale process recieved a null movie. Logic failure. Exception thrown.");
|
||||
|
||||
_loggingHelper.LogDebugInformation("Start of scanning for movie: {Movie}", movie);
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogDebugInformation("Scanning movie: {Movie}", movie);
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
|
||||
bool movieIsStale = false;
|
||||
|
||||
@@ -81,30 +81,19 @@ public sealed class StaleMediaTask : IScheduledTask
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Starting scan of series items.");
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
|
||||
List<BaseItem> staleSeasons = [.. series.SelectMany(GetStaleSeasons)];
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Starting scan of movies items.");
|
||||
_loggingHelper.LogInformation("End of scan for series items.");
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Starting scan of movie items.");
|
||||
|
||||
List<BaseItem> staleMovies = [.. GetStaleMovies(movies)];
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Stale Movies found: {StaleMovies}", staleMovies.Count);
|
||||
|
||||
if (staleMovies.Count > 0)
|
||||
{
|
||||
foreach (var movieInfo in staleMovies)
|
||||
{
|
||||
_loggingHelper.LogInformation("Movie Info: ID: {Id} | Movie Name: {MovieName}", [movieInfo.Id, movieInfo.Name]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_loggingHelper.LogInformation("No stale movies found!");
|
||||
}
|
||||
_loggingHelper.LogInformation("End of scan for movie items.");
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Stale seasons found: {StaleSeasons}", staleSeasons.Count);
|
||||
@@ -123,6 +112,21 @@ public sealed class StaleMediaTask : IScheduledTask
|
||||
_loggingHelper.LogInformation("No stale seasons found!");
|
||||
}
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Stale Movies found: {StaleMovies}", staleMovies.Count);
|
||||
|
||||
if (staleMovies.Count > 0)
|
||||
{
|
||||
foreach (var movieInfo in staleMovies)
|
||||
{
|
||||
_loggingHelper.LogInformation("Movie Info: ID: {Id} | Movie Name: {MovieName}", [movieInfo.Id, movieInfo.Name]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_loggingHelper.LogInformation("No stale movies found!");
|
||||
}
|
||||
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogInformation("Ending stale media scan...");
|
||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||
@@ -150,6 +154,7 @@ public sealed class StaleMediaTask : IScheduledTask
|
||||
|
||||
private List<BaseItem> GetStaleSeasons(BaseItem item)
|
||||
{
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogDebugInformation("Debug data for series: {SeriesName}", item.Name);
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user