{{ message }}
Repository navigation
Embedart normalize - #7079
Open
Sabrina04072003 wants to merge 6 commits into
Open
Embedart normalize#7079Sabrina04072003 wants to merge 6 commits into
Sabrina04072003 wants to merge 6 commits into
Conversation
Author
|
Hi, I have resolved the merge conflicts in docs/changelog.rst by keeping both changelog entries for the new features. |
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes #7068.
This PR adds a new option to the embedart plugin:
normalize. It is off by default.When it is on, and
maxwidthis set, big covers inside the music files are made smaller after an album is imported. This works even if fetchart finds no new cover. Small covers are not changed. Files without a cover are skipped.How it works
normalizeis on, the plugin listens to thealbum_importedevent. This event is sent after each album import.normalize_item.normalize_itemdoes this:art.extract).ArtResizer.shared.get_size).maxwidth, it does nothing.art.embed_item.album_importedand notart_set. Theart_setevent only happens when a new cover is found. This way it works in all cases, as the issue asks.import: writeis off.Design notes
normalizeoption (one of the two ideas in the issue). Somaxwidthworks the same as before.maxwidthis described in the docs. A tall image that is not wider thanmaxwidthwould not be changed.AI usage
I wrote this change with the help of an AI assistant (Claude). I am a Master's student and this is my first contribution to beets. I set up the project on Windows, applied the changes, and ran the tests and the linter myself. I will answer any questions about the code myself.
Testing
test/plugins/test_embedart.py:import: writeis off,maxwidthis not set.poe test test/plugins/test_embedart.pypasses on Windows: 28 passed, 4 skipped. The 4 skipped tests need ImageMagick or ffmpeg, which I do not have.poe lintpasses.To Do
docs/plugins/embedart.rst.)docs/changelog.rst.)