Repository navigation
convert: add format_map option - #7108
Open
zakharstudenttuke wants to merge 2 commits into
Open
zakharstudenttuke wants to merge 2 commits into
zakharstudenttuke wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7108 +/- ##
==========================================
- Coverage 80.49% 80.47% -0.03%
==========================================
Files 149 149
Lines 21248 21259 +11
Branches 3282 3283 +1
==========================================
+ Hits 17104 17108 +4
- Misses 3315 3321 +6
- Partials 829 830 +1
🚀 New features to boost your workflow:
|
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.
Fixes #7040.
Adds an optional
format_mapsetting to theconvertplugin. It maps the format of a source file to the format it should be converted to, so one run can produce different formats depending on the input:How the target format of a file is chosen:
-f/--formaton the command line, if given (overrides everything).format_map, using the format of the source file.formatoption.Implementation notes:
fmt,command). They are now looked up per item (get_target_format,get_command), andshould_transcode,get_item_destination,convert_item, the playlist code andconvert_on_importuse them.-f/--formatoption no longer has the config value as its default. It isNoneunless given, so the plugin can tell "not given" from "given". The option is otherwise unchanged.format_mapare case-insensitive.wavis accepted as an alias ofWAVE, which is how beets names WAV files.format_mapthe behaviour is unchanged.Testing:
test/plugins/test_convert.py(the existing stub command is used, so ffmpeg is not needed).