Address feedback from @sampsyo

This commit is contained in:
Andrew Rogl 2021-09-28 18:05:44 +10:00
parent ac6cc2ffa4
commit 237bd07508
2 changed files with 0 additions and 8 deletions

View file

@ -55,7 +55,6 @@ class MPDClientWrapper:
self._log.debug('music_directory: {0}', self.music_directory)
self._log.debug('strip_path: {0}', self.strip_path)
# On Python 3, python-mpd2 always uses Unicode
self.client = mpd.MPDClient()
def connect(self):

View file

@ -19,16 +19,9 @@ def arg_encoding():
def convert(in_file, out_file, tag):
"""Copy `in_file` to `out_file` and append the string `tag`.
"""
# On Python 3, encode the tag argument as bytes.
if not isinstance(tag, bytes):
tag = tag.encode('utf-8')
# On Windows, use Unicode paths. On Python 3, we get the actual,
# Unicode filenames. On Python 2, we get them as UTF-8 byes.
# if platform.system() == 'Windows' and PY2:
# in_file = in_file.decode('utf-8')
# out_file = out_file.decode('utf-8')
with open(out_file, 'wb') as out_f:
with open(in_file, 'rb') as in_f:
out_f.write(in_f.read())