From 7ac94495c365b309b83991fd2f3f7ac48a749d29 Mon Sep 17 00:00:00 2001 From: JervisTetch Date: Sun, 10 Jun 2018 15:29:50 +0200 Subject: [PATCH] fix UnicodeEncodeError on latin-1 https://github.com/mps-youtube/mps-youtube/issues/843 --- mps_youtube/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mps_youtube/history.py b/mps_youtube/history.py index 83c14a3e..454e4e01 100644 --- a/mps_youtube/history.py +++ b/mps_youtube/history.py @@ -36,7 +36,7 @@ def save(): hf.write('#EXTM3U\n\n') if 'history' in g.userhist: for song in g.userhist['history'].songs: - hf.write('#EXTINF:%d,%s\n' % (song.length, song.title)) + hf.write('#EXTINF:%d,%s\n' % (song.length, song.title.encode('utf-8'))) hf.write('https://www.youtube.com/watch?v=%s\n' % song.ytid) dbg(c.r + "History saved\n---" + c.w)