PICARD-187: Support for manually removing cover art
PICARD-187: Support for manually removing cover art
finishing PICARD-187
Summary
- This is a…
- [ ] Bug fix
- [x] Feature addition
- [ ] Refactoring
- [ ] Minor / simple change (like a typo)
- [ ] Other
- Describe this change in 1-2 sentences:
Problem
- JIRA ticket (optional): PICARD-187
Solution
Add support in all formats to allow to delete cover art tags, and modify ImageList to allow to remove desired image from ImageList
Action
I wasn't sure whether the extra test functions (for each format) will be required or not, so they are not added. However I have manually tested with all the audio files in test/data/
@ShubhamBhut I saw your messages about this PR on IRC, please discuss issues here instead
@ShubhamBhut I saw your messages about this PR on IRC, please discuss issues here instead
Ok. I think I rushed a little and missed an important part :
Basically, as I mentioned, the thumbnail is not updating in case of tag removal. I tried clearing pixmap_cache, and setting self.cover_art with a newly created CoverArtThumbnail but they didn't work. I think set_item() should have updated the image change. To be honest, now I am a bit lost on what part of the code is responsible for still displaying the deleted image in the thumbnail.
To be honest, now I am a bit lost on what part of the code is responsible for still displaying the deleted image in the thumbnail.
Keep in mind the displayed image is just a visual thing, a pixmap, so it has to be updated after the actual image was removed from metadata, but some care is needed because the same image might be used multiple times (in various tracks, or albums).
Have a look at https://github.com/metabrainz/picard/blob/7d97ff12043b80d8e9bad80423e6d8d2effacd71/picard/util/imagelist.py#L273C1-L286
Apologies for such late follow up, I tried a lot of different implementations. Now deletion seems to be done perfectly. But the thumbnail update still remains. For some reason, self.cover_art.set_metadata(metadata), sets the metadata correctly but it is overwritten by something else and the thumbnail goes back to the (deleted) cover art image.
Added PICARD-2865 to cover updating the documentation.
@ShubhamBhut, you should probably update the PICARD-187 ticket to show it being assigned to you so nobody else accidentally starts working on it.