mirror of
https://github.com/Lidarr/Lidarr
synced 2026-01-26 09:22:05 +01:00
Fixed: Correct diff previews when new tag image is null
Related to #2861
This commit is contained in:
parent
215df9c910
commit
37fbc65eb6
1 changed files with 16 additions and 2 deletions
|
|
@ -208,10 +208,17 @@ public void WriteTags(TrackFile trackfile, bool newDownload, bool force = false)
|
|||
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 @@ private IEnumerable<RetagTrackFilePreview> GetPreviews(List<TrackFile> files)
|
|||
|
||||
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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue