Media-Cleaner-Homepage-and-Api #7

Merged
T-Gander merged 12 commits from Media-Cleaner-Homepage-and-Api into main 2026-01-27 08:16:01 -07:00
2 changed files with 22 additions and 16 deletions
Showing only changes of commit 9bddc59fe2 - Show all commits

View File

@@ -19,7 +19,8 @@ public class MovieHelper(ILogger logger)
{ {
ArgumentNullException.ThrowIfNull(movie, "IsMovieStale process recieved a null movie. Logic failure. Exception thrown."); 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("-------------------------------------------------"); _loggingHelper.LogDebugInformation("-------------------------------------------------");
bool movieIsStale = false; bool movieIsStale = false;

View File

@@ -81,30 +81,19 @@ public sealed class StaleMediaTask : IScheduledTask
_loggingHelper.LogInformation("-------------------------------------------------"); _loggingHelper.LogInformation("-------------------------------------------------");
_loggingHelper.LogInformation("Starting scan of series items."); _loggingHelper.LogInformation("Starting scan of series items.");
_loggingHelper.LogInformation("-------------------------------------------------");
List<BaseItem> staleSeasons = [.. series.SelectMany(GetStaleSeasons)]; List<BaseItem> staleSeasons = [.. series.SelectMany(GetStaleSeasons)];
_loggingHelper.LogInformation("-------------------------------------------------"); _loggingHelper.LogInformation("-------------------------------------------------");
_loggingHelper.LogInformation("Starting scan of movies items."); _loggingHelper.LogInformation("End of scan for series items.");
_loggingHelper.LogInformation("-------------------------------------------------"); _loggingHelper.LogInformation("-------------------------------------------------");
_loggingHelper.LogInformation("Starting scan of movie items.");
List<BaseItem> staleMovies = [.. GetStaleMovies(movies)]; List<BaseItem> staleMovies = [.. GetStaleMovies(movies)];
_loggingHelper.LogInformation("-------------------------------------------------"); _loggingHelper.LogInformation("-------------------------------------------------");
_loggingHelper.LogInformation("Stale Movies found: {StaleMovies}", staleMovies.Count); _loggingHelper.LogInformation("End of scan for movie items.");
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("-------------------------------------------------");
_loggingHelper.LogInformation("Stale seasons found: {StaleSeasons}", staleSeasons.Count); _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("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("-------------------------------------------------");
_loggingHelper.LogInformation("Ending stale media scan..."); _loggingHelper.LogInformation("Ending stale media scan...");
_loggingHelper.LogInformation("-------------------------------------------------"); _loggingHelper.LogInformation("-------------------------------------------------");
@@ -150,6 +154,7 @@ public sealed class StaleMediaTask : IScheduledTask
private List<BaseItem> GetStaleSeasons(BaseItem item) private List<BaseItem> GetStaleSeasons(BaseItem item)
{ {
_loggingHelper.LogDebugInformation("-------------------------------------------------");
_loggingHelper.LogDebugInformation("Debug data for series: {SeriesName}", item.Name); _loggingHelper.LogDebugInformation("Debug data for series: {SeriesName}", item.Name);
_loggingHelper.LogDebugInformation("-------------------------------------------------"); _loggingHelper.LogDebugInformation("-------------------------------------------------");