|
|
@ -2,7 +2,6 @@
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using NLog;
|
|
|
|
using NLog;
|
|
|
|
using Ninject;
|
|
|
|
using Ninject;
|
|
|
|
using NzbDrone.Core.Model;
|
|
|
|
using NzbDrone.Core.Model;
|
|
|
@ -171,7 +170,9 @@ namespace NzbDrone.Core.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Add to InfoList for possible later processing
|
|
|
|
//Add to InfoList for possible later processing
|
|
|
|
InfoList.Add(new PostDownloadInfoModel{ Name = directoryInfo.FullName,
|
|
|
|
InfoList.Add(new PostDownloadInfoModel
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name = directoryInfo.FullName,
|
|
|
|
Added = DateTime.Now,
|
|
|
|
Added = DateTime.Now,
|
|
|
|
Status = postDownloadStatus
|
|
|
|
Status = postDownloadStatus
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -180,15 +181,18 @@ namespace NzbDrone.Core.Providers
|
|
|
|
var parseResult = Parser.ParseTitle(directoryInfo.Name.Substring(8));
|
|
|
|
var parseResult = Parser.ParseTitle(directoryInfo.Name.Substring(8));
|
|
|
|
parseResult.Series = _seriesProvider.FindSeries(parseResult.CleanTitle);
|
|
|
|
parseResult.Series = _seriesProvider.FindSeries(parseResult.CleanTitle);
|
|
|
|
|
|
|
|
|
|
|
|
var episodeIds = new List<int>();
|
|
|
|
List<int> episodeIds;
|
|
|
|
|
|
|
|
|
|
|
|
if (parseResult.EpisodeNumbers.Count == 0 && parseResult.FullSeason)
|
|
|
|
if (parseResult.EpisodeNumbers.Count == 0 && parseResult.FullSeason)
|
|
|
|
|
|
|
|
{
|
|
|
|
episodeIds =
|
|
|
|
episodeIds =
|
|
|
|
_episodeProvider.GetEpisodesBySeason(parseResult.Series.SeriesId, parseResult.SeasonNumber)
|
|
|
|
_episodeProvider.GetEpisodesBySeason(parseResult.Series.SeriesId, parseResult.SeasonNumber)
|
|
|
|
.Select(e => e.EpisodeId).ToList();
|
|
|
|
.Select(e => e.EpisodeId).ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
episodeIds = _episodeProvider.GetEpisodesByParseResult(parseResult).Select(e => e.EpisodeId).ToList();
|
|
|
|
episodeIds = _episodeProvider.GetEpisodesByParseResult(parseResult).Select(e => e.EpisodeId).ToList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_episodeProvider.SetPostDownloadStatus(episodeIds, postDownloadStatus);
|
|
|
|
_episodeProvider.SetPostDownloadStatus(episodeIds, postDownloadStatus);
|
|
|
|
}
|
|
|
|
}
|
|
|
|