Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 -l 下载歌词失败 #27

Open
AllenAnZifeng opened this issue Aug 10, 2022 · 11 comments
Open

使用 -l 下载歌词失败 #27

AllenAnZifeng opened this issue Aug 10, 2022 · 11 comments

Comments

@AllenAnZifeng
Copy link

林俊杰 - 交换余生.mp3下载失败,报错信息:ParseError: Unexpected token 抱 in JSON at position 0 i"
node:internal/fs/utils:345
throw err;
^

Error: ENOENT: no such file or directory, scandir '/home/allen/Documents/music'
at Object.readdirSync (node:fs:1405:3)
at F (file:///usr/lib/node_modules/musicn/dist/index.js:1:4247)
at process. (file:///usr/lib/node_modules/musicn/dist/index.js:3:801)
at process.emit (node:events:527:28)
at processEmit [as emit] (/usr/lib/node_modules/musicn/node_modules/signal-exit/index.js:199)
at process._fatalException (node:internal/process/execution:167:25) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/home/allen/Documents/music'
}

不论是否加 -p 写相对或者绝对路径,都会报错并且删除当前文件夹

@zonemeen
Copy link
Owner

你好,你下载的musicn版本是多少的?还有命令行输入了什么

@AllenAnZifeng
Copy link
Author

version 1.4.2
msc 林俊杰 -l -p /home/allen/Documents/music

@zonemeen
Copy link
Owner

zonemeen commented Aug 10, 2022

不影响使用的话,您可以先到个专门的文件夹下的当前路径去下载,先不要用-p,我晚上回家用mbp测一下

@zonemeen
Copy link
Owner

zonemeen commented Aug 10, 2022

我自己的电脑测是没什么问题的

image

@AllenAnZifeng
Copy link
Author

image
我的系统是ubuntu 22.04LTS,如果不加 -l 不要歌词的话可以正常下载

@AllenAnZifeng
Copy link
Author

这个是在GCP上测试的
image

@AllenAnZifeng
Copy link
Author

报错信息说这个文件夹不存在,我认为是因为进程把当前路径的文件夹删除了

@zonemeen
Copy link
Owner

zonemeen commented Aug 10, 2022

应该是这个原因,我有个判断是空的文件夹且报错了就会把文件夹删除,我只测了windows和mac os的都没啥问题,要兼容的话这个判断我估计得去了

@zonemeen
Copy link
Owner

zonemeen commented Aug 10, 2022

我升级了一下版本,你下载一下最新版本再看看

@AllenAnZifeng
Copy link
Author

windows的话是在wsl上嘛?好的我明天测试一下给你回复,如果本地文件夹已经下载过歌曲能不能接住报错而不是直接退出? 在ubuntu上 -n <数字> 不能使用,最多出现10个歌曲来下载

@zonemeen
Copy link
Owner

现在统一都用npm下载的,如果本地文件夹已经下载过歌曲能不能接住报错而不是直接退出? 后面有空的话我改进一下,ubuntu 因为我也没咋用过,不能使用是会报错吗😂,因为默认服务是酷我,一次请求的接口有点点多,我限制在了10个了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants