mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-10 23:29:53 +02:00
Fixed: Kometa and Kodi metadata failing with duplicate episode files
Closes #7381
This commit is contained in:
parent
dba3a82439
commit
5034d83062
@ -131,7 +131,15 @@ public override List<ImageFileResult> EpisodeImages(Series series, EpisodeFile e
|
|||||||
|
|
||||||
try
|
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)
|
if (screenshot == null)
|
||||||
{
|
{
|
||||||
|
@ -421,7 +421,15 @@ public override List<ImageFileResult> EpisodeImages(Series series, EpisodeFile e
|
|||||||
|
|
||||||
try
|
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)
|
if (screenshot == null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user