mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Fixed: Refreshing season images for XBMC metadata when there are multiple types (poster, banner, etc)
This commit is contained in:
@@ -313,14 +313,16 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
|
||||
}
|
||||
|
||||
_diskProvider.CopyFile(source, destination, false);
|
||||
var relativePath = DiskProviderBase.GetRelativePath(series.Path, destination);
|
||||
|
||||
var metadata = existingMetadataFiles.SingleOrDefault(c => c.Type == MetadataType.SeriesImage) ??
|
||||
var metadata = existingMetadataFiles.SingleOrDefault(c => c.Type == MetadataType.SeriesImage &&
|
||||
c.RelativePath == relativePath) ??
|
||||
new MetadataFile
|
||||
{
|
||||
SeriesId = series.Id,
|
||||
Consumer = GetType().Name,
|
||||
Type = MetadataType.SeriesImage,
|
||||
RelativePath = DiskProviderBase.GetRelativePath(series.Path, destination)
|
||||
RelativePath = relativePath
|
||||
};
|
||||
|
||||
yield return metadata;
|
||||
@@ -341,18 +343,20 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
|
||||
}
|
||||
|
||||
var path = Path.Combine(series.Path, filename);
|
||||
|
||||
DownloadImage(series, image.Url, path);
|
||||
var relativePath = DiskProviderBase.GetRelativePath(series.Path, path);
|
||||
|
||||
DownloadImage(series, image.Url, path);
|
||||
|
||||
var metadata = existingMetadataFiles.SingleOrDefault(c => c.Type == MetadataType.SeasonImage &&
|
||||
c.SeasonNumber == season.SeasonNumber) ??
|
||||
c.SeasonNumber == season.SeasonNumber &&
|
||||
c.RelativePath == relativePath) ??
|
||||
new MetadataFile
|
||||
{
|
||||
SeriesId = series.Id,
|
||||
SeasonNumber = season.SeasonNumber,
|
||||
Consumer = GetType().Name,
|
||||
Type = MetadataType.SeasonImage,
|
||||
RelativePath = DiskProviderBase.GetRelativePath(series.Path, path)
|
||||
RelativePath = relativePath
|
||||
};
|
||||
|
||||
yield return metadata;
|
||||
|
||||
Reference in New Issue
Block a user