mirror of
https://github.com/beetbox/beets.git
synced 2026-02-02 05:21:45 +01:00
Address feedback from @sampsyo
This commit is contained in:
parent
ac6cc2ffa4
commit
237bd07508
2 changed files with 0 additions and 8 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue