Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion beetsplug/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,12 @@ def convert_item(
item, original, converted = None, None, None
while True:
item = yield (item, original, converted)
# item format should represent the converted format, not the original
original_format, new_format = item.format, fmt.upper()
item.format = new_format
dest = item.destination(basedir=dest_dir, path_formats=path_formats)

# need to restore this attribute for checks further along
item.format = original_format
# Ensure that desired item is readable before processing it. Needed
# to avoid any side-effect of the conversion (linking, keep_new,
# refresh) if we already know that it will fail.
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Bug fixes:

- |BeetsPlugin|: load the last plugin class defined in the plugin namespace.
:bug:`6093`
- Fixed convert plugin not taking into account the new format when determining
the target path. :bug:`1360`

For packagers:

Expand Down
Loading