beets icon indicating copy to clipboard operation
beets copied to clipboard

Fix extension issue in convert plugin when exporting a playlist

Open pierreay opened this issue 1 year ago • 3 comments

Description

Fix extension substitution inside path of the exported playlist.

Before this, the exported playlist contained relative paths pointing to the converted files BUT the extension were not substituted comparing to before and the after the conversion. Therefore, running the playlist will fail for files which have been converted and where extension have changed.

Example:

  1. Convert /path/to/library/artist.flac to /path/to/converted/artist.mp3 using the -m playlist.m3u command-line flag.
  2. Open the generated playlist, and find the incorrect path /path/to/converted/artist.flac inside.

To Do

  • [X] Documentation
  • [X] Changelog
  • [X] Tests

pierreay avatar Apr 20 '24 21:04 pierreay

Hi! Thanks for the PR. I've left a comment or two. Would you also be able to add a test that fails under the old code and succeeds with the new?

I'm not familiar with unit tests in Python, but since you ask, I will give a try!

pierreay avatar Jun 27 '24 07:06 pierreay

I added the appropriate test case! ;)

pierreay avatar Jul 03 '24 12:07 pierreay