Continued to improve logging and fixed a few bugs introduced by refactor
This commit is contained in:
@@ -17,7 +17,6 @@ public class MovieHelper(ILogger logger)
|
||||
|
||||
public bool IsMovieStale(BaseItem movie)
|
||||
{
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogDebugInformation("Start of scanning for movie: {Movie}", movie);
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
|
||||
@@ -41,19 +40,22 @@ public class MovieHelper(ILogger logger)
|
||||
|
||||
if (mostRecentUserData.LastPlayedDate < DateTime.Now.AddDays(-Configuration.StaleMediaCutoff))
|
||||
{
|
||||
_loggingHelper.LogDebugInformation("Most recent user data last played date is outside of cutoff. Adding {Movie} to stale movies.", movie);
|
||||
_loggingHelper.LogDebugInformation("Most recent user data has last played date that is outside of cutoff.");
|
||||
_loggingHelper.LogDebugInformation("Adding {Movie} to stale movies.", movie);
|
||||
_loggingHelper.LogDebugInformation("With Last Played Date: {LastPlayedDate}", mostRecentUserData.LastPlayedDate);
|
||||
|
||||
movieIsStale = true;
|
||||
}
|
||||
}
|
||||
else if (createdOutsideCutoff)
|
||||
{
|
||||
_loggingHelper.LogDebugInformation("Movie has no user data and was created outside of cutoff: {DateCreated}. Adding {Movie} to stale movies.", [movie.DateCreated, movie]);
|
||||
_loggingHelper.LogDebugInformation("Movie has no user data and was created outside of cutoff: {DateCreated}.", movie.DateCreated);
|
||||
_loggingHelper.LogDebugInformation("Adding {Movie} to stale movies.", movie);
|
||||
movieIsStale = true;
|
||||
}
|
||||
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
_loggingHelper.LogDebugInformation("End of scanning for movie: {Movie}", movie);
|
||||
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||
|
||||
return movieIsStale;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user