From 68a54b88c475377589482c750f8139353ef532d9 Mon Sep 17 00:00:00 2001 From: Zeugma440 Date: Sun, 20 Nov 2022 20:06:01 +0100 Subject: [PATCH] Allow rewriting the same embedded picture [#170] --- ATL/Entities/Track.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ATL/Entities/Track.cs b/ATL/Entities/Track.cs index 3ea33ed0..5d8a52d2 100644 --- a/ATL/Entities/Track.cs +++ b/ATL/Entities/Track.cs @@ -512,7 +512,9 @@ private TagData toTagData() // Detect and tag deleted pictures (=those which were in initialEmbeddedPictures and do not appear in embeddedPictures anymore) foreach (PictureInfo picInfo in initialEmbeddedPictures) { - if (!currentEmbeddedPictures.Contains(picInfo)) + PictureInfo targetPic = currentEmbeddedPictures.FirstOrDefault(pi => picInfo.EqualsProper(pi)); + + if (null == targetPic) { PictureInfo picToDelete = new PictureInfo(picInfo); picToDelete.MarkedForDeletion = true;