python3 decode

This commit is contained in:
j 2016-10-26 22:19:07 +02:00
parent 0893715069
commit 5488eaf223

View file

@ -93,7 +93,9 @@ def download(item_id, url):
return '%s contains no videos' % url
media = info[0]
cdir = os.path.abspath(os.curdir)
tmp = tempfile.mkdtemp().decode('utf-8')
tmp = tempfile.mkdtemp()
if isinstance(tmp, bytes):
tmp = tmp.decode('utf-8')
os.chdir(tmp)
cmd = ['youtube-dl', '-q', media['url']]
p = subprocess.Popen(cmd,