mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 20:43:41 +01:00
Play plugin: byte newlines in files written
Avoid unicode errors when writing '\n' around file paths.
This commit is contained in:
parent
296c2fc3de
commit
13e47472ac
1 changed files with 2 additions and 2 deletions
|
|
@ -94,9 +94,9 @@ def play_music(lib, opts, args, log):
|
|||
m3u = NamedTemporaryFile('w', suffix='.m3u', delete=False)
|
||||
for item in paths:
|
||||
if relative_to:
|
||||
m3u.write(relpath(item, relative_to) + '\n')
|
||||
m3u.write(relpath(item, relative_to) + b'\n')
|
||||
else:
|
||||
m3u.write(item + '\n')
|
||||
m3u.write(item + b'\n')
|
||||
m3u.close()
|
||||
|
||||
command.append(m3u.name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue