mirror of https://github.com/Sonarr/Sonarr
Fixed Season Special import.
This commit is contained in:
parent
aa2174b43c
commit
7c95fc23d0
|
@ -3,6 +3,7 @@ using System.Linq;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
using NzbDrone.Core.Download;
|
using NzbDrone.Core.Download;
|
||||||
|
using NzbDrone.Core.Parser;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
|
|
||||||
namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
||||||
|
@ -10,10 +11,12 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
||||||
public class MatchesFolderSpecification : IImportDecisionEngineSpecification
|
public class MatchesFolderSpecification : IImportDecisionEngineSpecification
|
||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
private readonly IParsingService _parsingService;
|
||||||
|
|
||||||
public MatchesFolderSpecification(Logger logger)
|
public MatchesFolderSpecification(ParsingService parsingService, Logger logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
_parsingService = parsingService;
|
||||||
}
|
}
|
||||||
public Decision IsSatisfiedBy(LocalEpisode localEpisode, DownloadClientItem downloadClientItem)
|
public Decision IsSatisfiedBy(LocalEpisode localEpisode, DownloadClientItem downloadClientItem)
|
||||||
{
|
{
|
||||||
|
@ -31,6 +34,11 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
||||||
|
|
||||||
var folderInfo = Parser.Parser.ParseTitle(dirInfo.Name);
|
var folderInfo = Parser.Parser.ParseTitle(dirInfo.Name);
|
||||||
|
|
||||||
|
if (folderInfo != null && folderInfo.IsPossibleSceneSeasonSpecial)
|
||||||
|
{
|
||||||
|
folderInfo = _parsingService.ParseSpecialEpisodeTitle(folderInfo, dirInfo.Name, localEpisode.Series.TvdbId, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (folderInfo == null)
|
if (folderInfo == null)
|
||||||
{
|
{
|
||||||
return Decision.Accept();
|
return Decision.Accept();
|
||||||
|
|
Loading…
Reference in New Issue