Fixed: Refreshing season images for XBMC metadata when there are multiple types (poster, banner, etc)
This commit is contained in:
parent
9645fb07db
commit
380a813dbc
|
@ -313,14 +313,16 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
|
||||||
}
|
}
|
||||||
|
|
||||||
_diskProvider.CopyFile(source, destination, false);
|
_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
|
new MetadataFile
|
||||||
{
|
{
|
||||||
SeriesId = series.Id,
|
SeriesId = series.Id,
|
||||||
Consumer = GetType().Name,
|
Consumer = GetType().Name,
|
||||||
Type = MetadataType.SeriesImage,
|
Type = MetadataType.SeriesImage,
|
||||||
RelativePath = DiskProviderBase.GetRelativePath(series.Path, destination)
|
RelativePath = relativePath
|
||||||
};
|
};
|
||||||
|
|
||||||
yield return metadata;
|
yield return metadata;
|
||||||
|
@ -341,18 +343,20 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
|
||||||
}
|
}
|
||||||
|
|
||||||
var path = Path.Combine(series.Path, filename);
|
var path = Path.Combine(series.Path, filename);
|
||||||
|
var relativePath = DiskProviderBase.GetRelativePath(series.Path, path);
|
||||||
|
|
||||||
DownloadImage(series, image.Url, path);
|
DownloadImage(series, image.Url, path);
|
||||||
|
|
||||||
var metadata = existingMetadataFiles.SingleOrDefault(c => c.Type == MetadataType.SeasonImage &&
|
var metadata = existingMetadataFiles.SingleOrDefault(c => c.Type == MetadataType.SeasonImage &&
|
||||||
c.SeasonNumber == season.SeasonNumber) ??
|
c.SeasonNumber == season.SeasonNumber &&
|
||||||
|
c.RelativePath == relativePath) ??
|
||||||
new MetadataFile
|
new MetadataFile
|
||||||
{
|
{
|
||||||
SeriesId = series.Id,
|
SeriesId = series.Id,
|
||||||
SeasonNumber = season.SeasonNumber,
|
SeasonNumber = season.SeasonNumber,
|
||||||
Consumer = GetType().Name,
|
Consumer = GetType().Name,
|
||||||
Type = MetadataType.SeasonImage,
|
Type = MetadataType.SeasonImage,
|
||||||
RelativePath = DiskProviderBase.GetRelativePath(series.Path, path)
|
RelativePath = relativePath
|
||||||
};
|
};
|
||||||
|
|
||||||
yield return metadata;
|
yield return metadata;
|
||||||
|
|
Loading…
Reference in New Issue