mirror of https://github.com/Sonarr/Sonarr
Fixed: Kometa and Kodi metadata failing with duplicate episode files
Closes #7381
This commit is contained in:
parent
ca0bb14027
commit
bbd9f0f545
|
@ -131,7 +131,15 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Kometa
|
|||
|
||||
try
|
||||
{
|
||||
var screenshot = episodeFile.Episodes.Value.First().Images.SingleOrDefault(i => i.CoverType == MediaCoverTypes.Screenshot);
|
||||
var firstEpisode = episodeFile.Episodes.Value.FirstOrDefault();
|
||||
|
||||
if (firstEpisode == null)
|
||||
{
|
||||
_logger.Debug("Episode file has no associated episodes, potentially a duplicate file");
|
||||
return new List<ImageFileResult>();
|
||||
}
|
||||
|
||||
var screenshot = firstEpisode.Images.SingleOrDefault(i => i.CoverType == MediaCoverTypes.Screenshot);
|
||||
|
||||
if (screenshot == null)
|
||||
{
|
||||
|
|
|
@ -421,7 +421,15 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc
|
|||
|
||||
try
|
||||
{
|
||||
var screenshot = episodeFile.Episodes.Value.First().Images.SingleOrDefault(i => i.CoverType == MediaCoverTypes.Screenshot);
|
||||
var firstEpisode = episodeFile.Episodes.Value.FirstOrDefault();
|
||||
|
||||
if (firstEpisode == null)
|
||||
{
|
||||
_logger.Debug("Episode file has no associated episodes, potentially a duplicate file");
|
||||
return new List<ImageFileResult>();
|
||||
}
|
||||
|
||||
var screenshot = firstEpisode.Images.SingleOrDefault(i => i.CoverType == MediaCoverTypes.Screenshot);
|
||||
|
||||
if (screenshot == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue