Fixed: Correct diff previews when new tag image is null

Related to #2861
This commit is contained in:
Qstick 2022-10-22 22:37:17 -05:00
parent 215df9c910
commit 37fbc65eb6
1 changed files with 16 additions and 2 deletions

View File

@ -208,10 +208,17 @@ namespace NzbDrone.Core.MediaFiles
return;
}
var newTags = GetTrackMetadata(trackfile);
var path = trackfile.Path;
var oldTags = ReadAudioTag(path);
var newTags = GetTrackMetadata(trackfile);
var diff = ReadAudioTag(path).Diff(newTags);
// We don't overwrite image when new image is null
if (newTags.ImageFile == null && !_configService.ScrubAudioTags)
{
newTags.ImageSize = oldTags.ImageSize;
}
var diff = oldTags.Diff(newTags);
_rootFolderWatchingService.ReportFileSystemChangeBeginning(path);
@ -350,6 +357,13 @@ namespace NzbDrone.Core.MediaFiles
var oldTags = ReadAudioTag(f.Path);
var newTags = GetTrackMetadata(f);
// We don't overwrite image when new image is null
if (newTags.ImageFile == null && !_configService.ScrubAudioTags)
{
newTags.ImageSize = oldTags.ImageSize;
}
var diff = oldTags.Diff(newTags);
if (diff.Any())