cloudmusic icon indicating copy to clipboard operation
cloudmusic copied to clipboard

特殊字符进行的修正和macOS路径错误的修正

Open danceking opened this issue 3 years ago • 2 comments

download.py

music.name = music.name.replace("/", "&")
if not artist is None:
	artist = artist.replace("/", "&")
name = music.name + " - " + artist + "." + music.type

if not dirs:

	if sys.platform == "darwin":
		path1 = "cloudmusic/"
		path2 = "/cloudmusic"
		path3 = "/"
	else :
		path1 = "cloudmusic\\"
		path2 = "\\cloudmusic"
		path3 = "\\"

	dirs = path1 + name
	defalut_dirs = str(os.getcwd()) + path2
	isExist = os.path.exists(defalut_dirs)
	if not isExist:
		os.makedirs(defalut_dirs)
else :
	dirs += path3 + name

danceking avatar Jun 11 '21 19:06 danceking

谢谢大佬,可以直接提交pr哦

p697 avatar Jun 12 '21 02:06 p697

说实话,我不会玩git,尴尬。。。

danceking avatar Jun 13 '21 11:06 danceking