Beet won’t play songs with brackets () in the file name
Here’s an example:
$ beet ls -f '$artist -- $album -- $title : $path' zamf you
Zamf -- Xingerbread -- Your Hand : /Users/redacted/Music/beet/Zamf/Xingerbread/01 Your Hand.mp3
Zamf -- Xingerbread -- You Belong to Me [Bob Dylan Cover] : /Users/redacted/Music/beet/Zamf/Xingerbread/13 You Belong to Me [Bob Dylan Cover].mp3
$ beet play zamf you
Playing 2 tracks.
However, the media player (VLC in my case) plays “Your Hand” only; it never plays “You Belong to Me”. I can reproduce this with various songs, and it seems to boil down to the  characters in the file name.
$ beet --verbose play zamf you
user configuration: /Users/redacted/.config/beets/config.yaml
data directory: /Users/redacted/.config/beets
Sending event: pluginload
lyrics: Disabling google source: no API key configured.
lyrics: The Genius backend requires BeautifulSoup, which is not installed, so the source is disabled.
library database: /Users/redacted/Music/beet.db
library directory: /Users/redacted/Music/beet
Sending event: library_opened
Playing 2 tracks.
play: executing command: open ['/var/folders/ns/zxjyg_1d3w38f7gr6pg8w6p00000gn/T/tmpv2kx18o5.m3u']
$ cat /var/folders/ns/zxjyg_1d3w38f7gr6pg8w6p00000gn/T/tmpv2kx18o5.m3u
/Users/redacted/Music/beet/Zamf/Xingerbread/01 Your Hand.mp3
/Users/redacted/Music/beet/Zamf/Xingerbread/13 You Belong to Me [Bob Dylan Cover].mp3
Based on this, it might be a problem with VLC… the m3u file looks decent. Or does the m3u standard require to escape shell characters in playlists?
I’ve tried the following playlist, which use URL encoding. This works:
Got it! Yes, it looks like a specific problem with VLC.
The problem with .m3u playlists is that they don’t really have a spec. The Wikipedia article (especially the first section after the TOC) is very enlightening:
So every tool handles them differently. The gist is “a list of filenames separated by newlines,” but beyond that, it’s anyone’s guess. If VLC accepts file URLs but not brackets in ordinary pathnames, that’s sad but just the way things are when there’s no agreed-upon spec.
Anyway, yeah, totally, a config option to emit file:/// URLs instead of plain, absolute filesystem paths would be a good idea and a patch we’d absolutely accept.