Fixes a few things with importing: Sample check is done even when file is already in movie folder. Fixed importing of movies with "DC".

pull/102/head
Leonardo Galli 8 years ago
parent 236e16c9a5
commit 52fb29ee18

@ -94,7 +94,6 @@ namespace NzbDrone.Core.Download
return;
}
var series = _parsingService.GetSeries(trackedDownload.DownloadItem.Title);
if (series == null)
@ -156,7 +155,7 @@ namespace NzbDrone.Core.Download
trackedDownload.Warn(statusMessages);
}
}
else
else if (trackedDownload.RemoteEpisode.Series != null)
{
var importResults = _downloadedEpisodesImportService.ProcessPath(outputPath, ImportMode.Auto, trackedDownload.RemoteEpisode.Series, trackedDownload.DownloadItem);

@ -40,12 +40,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
public Decision IsSatisfiedBy(LocalMovie localEpisode)
{
if (localEpisode.ExistingFile)
{
_logger.Debug("Existing file, skipping sample check");
return Decision.Accept();
}
var sample = _detectSample.IsSample(localEpisode.Movie,
localEpisode.Quality,
localEpisode.Path,

@ -192,6 +192,11 @@ namespace NzbDrone.Core.Parser
parsedEpisodeInfo.MovieTitleInfo.Year);
}
if (series == null)
{
series = _movieService.FindByTitle(parsedEpisodeInfo.MovieTitle.Replace("DC", "").Trim());
}
return series;
}

@ -63,11 +63,11 @@ namespace NzbDrone.Core.Tv
cleanNum = cleanNum.Replace(roman, num);
}
var result = Query.Where(s => s.CleanTitle == cleanTitle).SingleOrDefault();
var result = Query.Where(s => s.CleanTitle == cleanTitle).FirstOrDefault();
if (result == null)
{
result = Query.Where(s => s.CleanTitle == cleanNum).OrWhere(s => s.CleanTitle == cleanRoman).SingleOrDefault();
result = Query.Where(s => s.CleanTitle == cleanNum).OrWhere(s => s.CleanTitle == cleanRoman).FirstOrDefault();
if (result == null)
{
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Tv
result = movies.Where(m => m.AlternativeTitles.Any(t => Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanTitle ||
Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanRoman ||
Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanNum)).SingleOrDefault();
Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanNum)).FirstOrDefault();
return result;
}

Loading…
Cancel
Save