806e6e6ea4
增加了根据歌单下载的功能,修复了多个音乐一块下载时文件名格式无效的问题,优化代码
18 lines
324 B
Python
18 lines
324 B
Python
from os import mkdir as raw_mkdir
|
|
from os.path import exists
|
|
|
|
INIT_DIRECTORIES = [
|
|
'out'
|
|
]
|
|
|
|
def mkdir(dirpath: str) -> bool:
|
|
if not exists(dirpath):
|
|
raw_mkdir(dirpath)
|
|
|
|
return [True if exists(dirpath) else False][0]
|
|
|
|
|
|
def init_directories():
|
|
for dir_name in INIT_DIRECTORIES:
|
|
mkdir(dir_name)
|