|
|
|
@ -58,8 +58,6 @@ namespace NzbDrone.Core.Metadata
|
|
|
|
|
|
|
|
|
|
if (metadata.Type == MetadataType.EpisodeImage ||
|
|
|
|
|
metadata.Type == MetadataType.EpisodeMetadata)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var localEpisode = _parsingService.GetLocalEpisode(possibleMetadataFile, message.Series);
|
|
|
|
|
|
|
|
|
@ -69,6 +67,12 @@ namespace NzbDrone.Core.Metadata
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (localEpisode.Episodes.Empty())
|
|
|
|
|
{
|
|
|
|
|
_logger.Debug("Cannot find related episodes for: {0}", possibleMetadataFile);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (localEpisode.Episodes.DistinctBy(e => e.EpisodeFileId).Count() > 1)
|
|
|
|
|
{
|
|
|
|
|
_logger.Debug("Metadata file: {0} does not match existing files.", possibleMetadataFile);
|
|
|
|
@ -76,13 +80,6 @@ namespace NzbDrone.Core.Metadata
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
metadata.EpisodeFileId = localEpisode.Episodes.First().EpisodeFileId;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (EpisodeNotFoundException e)
|
|
|
|
|
{
|
|
|
|
|
_logger.Debug("Cannot find related episodes for: {0}", possibleMetadataFile);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
metadataFiles.Add(metadata);
|
|
|
|
|