v1.2.3 저장 경로가 존재하지 않으면 생성하도록 개선

This commit is contained in:
joyfuI
2020-02-21 23:18:21 +09:00
parent 87d310900b
commit f8c080093c
5 changed files with 11 additions and 4 deletions

View File

@@ -47,7 +47,11 @@ class Youtube_dl(object):
self.plugin = plugin
self.url = url
self.filename = filename
if not os.path.isdir(temp_path):
os.makedirs(temp_path)
self.temp_path = tempfile.mkdtemp(prefix='youtube-dl_', dir=temp_path)
if not os.path.isdir(save_path):
os.makedirs(save_path)
self.save_path = save_path
self.format_code = format_code
self.index = Youtube_dl._index