|
|
|
@ -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;
|
|
|
|
|