From 13e47472ac7622b57178c734b1933d826e8b9fdb Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Sun, 15 Feb 2015 15:34:02 +0100 Subject: [PATCH] Play plugin: byte newlines in files written Avoid unicode errors when writing '\n' around file paths. --- beetsplug/play.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/play.py b/beetsplug/play.py index f6a59098f..5de5dcf32 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -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)