Log when scene name is not stored for file

This commit is contained in:
Mark McDowall 2020-09-29 20:40:42 -07:00
parent 644d16d82b
commit 021bb2d6d5
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using NLog;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Core.Profiles.Releases; using NzbDrone.Core.Profiles.Releases;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
@ -13,10 +14,12 @@ namespace NzbDrone.Core.MediaFiles
public class EpisodeFilePreferredWordCalculator : IEpisodeFilePreferredWordCalculator public class EpisodeFilePreferredWordCalculator : IEpisodeFilePreferredWordCalculator
{ {
private readonly IPreferredWordService _preferredWordService; private readonly IPreferredWordService _preferredWordService;
private readonly Logger _logger;
public EpisodeFilePreferredWordCalculator(IPreferredWordService preferredWordService) public EpisodeFilePreferredWordCalculator(IPreferredWordService preferredWordService, Logger logger)
{ {
_preferredWordService = preferredWordService; _preferredWordService = preferredWordService;
_logger = logger;
} }
public int Calculate(Series series, EpisodeFile episodeFile) public int Calculate(Series series, EpisodeFile episodeFile)
{ {
@ -26,6 +29,10 @@ namespace NzbDrone.Core.MediaFiles
{ {
scores.Add(_preferredWordService.Calculate(series, episodeFile.SceneName, 0)); scores.Add(_preferredWordService.Calculate(series, episodeFile.SceneName, 0));
} }
else
{
_logger.Trace("No stored scene name for {0}", episodeFile);
}
// Calculate using RelativePath or Path, but not both // Calculate using RelativePath or Path, but not both
if (episodeFile.RelativePath.IsNotNullOrWhiteSpace()) if (episodeFile.RelativePath.IsNotNullOrWhiteSpace())