Log when scene name is not stored for file

pull/3980/head
Mark McDowall 4 years ago
parent 644d16d82b
commit 021bb2d6d5

@ -1,4 +1,5 @@
using System.Collections.Generic;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Profiles.Releases;
using NzbDrone.Core.Tv;
@ -13,10 +14,12 @@ namespace NzbDrone.Core.MediaFiles
public class EpisodeFilePreferredWordCalculator : IEpisodeFilePreferredWordCalculator
{
private readonly IPreferredWordService _preferredWordService;
private readonly Logger _logger;
public EpisodeFilePreferredWordCalculator(IPreferredWordService preferredWordService)
public EpisodeFilePreferredWordCalculator(IPreferredWordService preferredWordService, Logger logger)
{
_preferredWordService = preferredWordService;
_logger = logger;
}
public int Calculate(Series series, EpisodeFile episodeFile)
{
@ -26,6 +29,10 @@ namespace NzbDrone.Core.MediaFiles
{
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
if (episodeFile.RelativePath.IsNotNullOrWhiteSpace())

Loading…
Cancel
Save