convert's playlist option uses original extensions
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
### Problem
Running this command in verbose (`-vv`) mode:
```sh
$ beet -vv convert -m test.m3u lifelight
user configuration: /home/leo60228/.config/beets/config.yaml
data directory: /home/leo60228/.config/beets
plugin paths:
fetchart: google: Disabling art source due to missing key
fetchart: lastfm: Disabling art source due to missing key
Sending event: pluginload
library database: /home/leo60228/.config/beets/library.db
library directory: /home/leo60228/Music
Sending event: library_opened
Parsed query: AndQuery([OrQuery([SubstringQuery('artist', 'lifelight', fast=True), SubstringQuery('title', 'lifelight', fast=True), SubstringQuery('comments', 'lifelight', fast=True), SubstringQuery('album', 'lifelight', fast=True), SubstringQuery('albumartist', 'lifelight', fast=True), SubstringQuery('genre', 'lifelight', fast=True)])])
Parsed sort: NullSort()
RichaadEB & Cristina Vee - Lifelight (English Version) - Lifelight - English Version
Convert? (Y/n)
Parsed query: AndQuery([NoneQuery('album_id', True)])
Parsed sort: NullSort()
Parsed query: AndQuery([BooleanQuery('comp', 1, fast=True)])
Parsed sort: NullSort()
Parsed query: AndQuery([OrQuery([SubstringQuery('artist', 'Necrozma', fast=True), SubstringQuery('title', 'Necrozma', fast=True), SubstringQuery('comments', 'Necrozma', fast=True), SubstringQuery('album', 'Necrozma', fast=True), SubstringQuery('albumartist', 'Necrozma', fast=True), SubstringQuery('genre', 'Necrozma', fast=True)])])
Parsed sort: NullSort()
Parsed query: AndQuery([OrQuery([SubstringQuery('artist', 'Necrozma', fast=True), SubstringQuery('title', 'Necrozma', fast=True), SubstringQuery('comments', 'Necrozma', fast=True), SubstringQuery('album', 'Necrozma', fast=True), SubstringQuery('albumartist', 'Necrozma', fast=True), SubstringQuery('genre', 'Necrozma', fast=True)])])
Parsed sort: NullSort()
convert: Encoding /home/leo60228/Music/RichaadEB/Lifelight (English Version)/01 Lifelight - English Version.flac
convert: Finished encoding /home/leo60228/Music/RichaadEB/Lifelight (English Version)/01 Lifelight - English Version.flac
Sending event: write
Sending event: after_write
Sending event: after_convert
convert: Creating playlist file /home/leo60228/TranscodedMusic/test.m3u
Parsed query: AndQuery([NoneQuery('album_id', True)])
Parsed sort: NullSort()
Parsed query: AndQuery([BooleanQuery('comp', 1, fast=True)])
Parsed sort: NullSort()
Sending event: cli_exit
playlist: Updating playlist: /home/leo60228/Playlists/Shuffle.m3u
```
Led to this problem:
```
$ find TranscodedMusic/
TranscodedMusic/
TranscodedMusic/RichaadEB
TranscodedMusic/RichaadEB/Lifelight (English Version)
TranscodedMusic/RichaadEB/Lifelight (English Version)/01 Lifelight - English Version.opus
TranscodedMusic/test.m3u
$ cat TranscodedMusic/test.m3u
#EXTM3U
RichaadEB/Lifelight (English Version)/01 Lifelight - English Version.flac
```
### Setup
* OS: Linux (NixOS 25.05)
* Python version: 3.12.10
* beets version: 2.3.1
* Turning off plugins made problem go away (yes/no): no
My configuration (output of `beet config`) is:
```yaml
# --------------- Plugins ---------------
plugins: edit playlist fetchart substitute mpdupdate replaygain convert info
replace:
'[\\/]': _
^\.: _
'[\x00-\x1f]': _
'\b: ': ' '
':': '-'
'[<>"\?\*\|]': _
\.$: _
\s+$: ''
^\s+: ''
^-: _
playlist:
auto: yes
playlist_dir: ~/Playlists
relative_to: library
forward_slash: no
fetchart:
sources: [filesystem]
auto: yes
minwidth: 0
maxwidth: 0
quality: 0
max_filesize: 0
enforce_ratio: no
cautious: no
cover_names:
- cover
- front
- art
- album
- folder
store_source: no
high_resolution: no
deinterlace: no
cover_format:
google_key: REDACTED
google_engine: REDACTED
fanarttv_key: REDACTED
lastfm_key: REDACTED
paths:
default: '%substitute{$albumartist}/$album%aunique{}/$track $title'
singleton: $artist/Non-Album/$title
comp: '%substitute{$albumartist}/$album%aunique{}/$track $title'
substitute:
^nightmargin.*: Nightmargin
"^\u98EF\u5409\u65B0$": Spike Chunsoft
replaygain:
backend: ffmpeg
r128: ''
overwrite: no
auto: yes
threads: 24
parallel_on_import: no
per_disc: no
peak: 'true'
targetlevel: 89
r128_targetlevel: 84
convert:
auto_keep: yes
copy_album_art: yes
dest: ~/TranscodedMusic
embed: no
never_convert_lossy_files: yes
hardlink: yes
format: opus
formats:
opus: ffmpeg -i $source -y -c:v copy -acodec libopus -ab 192k $dest
aac:
command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
extension: m4a
alac:
command: ffmpeg -i $source -y -vn -acodec alac $dest
extension: m4a
flac: ffmpeg -i $source -y -vn -acodec flac $dest
mp3: ffmpeg -i $source -y -vn -aq 2 $dest
ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
no_convert: Necrozma
pretend: no
link: no
threads: 24
id3v23: inherit
max_bitrate:
auto: no
tmpdir:
quiet: no
paths: {}
album_art_maxwidth: 0
delete_originals: no
playlist:
mpd:
host: localhost
port: 6600
password: REDACTED
edit:
albumfields: album albumartist
itemfields: track title artist album
ignore_fields: id path
```
Contributor guide
Research direction
Start with the convert command's playlist-generation path and reproduce the example using test.m3u, the opus format, and the shown convert configuration. Compare the generated playlist entry with the converted file under TranscodedMusic; done means test.m3u references the resulting .opus path rather than the original .flac extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100