👨🏻💻 喜欢音乐的后端开发工程师
- 🌈 喜欢音乐,风格比较杂,但偏爱抒情慢歌,同好可以点击上面网易云标签听听我的歌单。会凭借一点相对音感弹些电钢,可惜不熟读五线谱
- 🚀 喜欢折腾代码,写一些对生活有帮助的 repo。可以看看我的 repo 里有没有你喜欢的?
- 🧐 爱好也非常广泛,好奇心很重,什么都想学一些,例如编曲、绘画、小说、电影
- 🎉 计算机技能树比较杂,前后端都有。例如 golang, php, node.js, vue
- ✍🏻 文字输出不多,但坚持写日记和偶尔写点博客
我的音乐精灵
License: Apache License 2.0
可能是我的机器配置过低或者网络环境不好,搜索歌曲的时候xhr请求总是超时超过5000ms。将preload-helper-59e8b50d.js中的xhr请求超时时间改大就可以使用了。
node 版本 12.16.2
使用 yarn 也可以正常 install 和 build
ℹ uid(melody)'s cookie not found from .profile
ℹ uid(melody) login with 137省略6 via phone
{
status: 250,
body: { loginType: 1, code: 250, message: '当前登录存在安全风险,请稍后再试' },
cookie: [
'NMTID=00省略gA; Max-Age=315360000; Expires=Thu, 12 Aug 2032 03:36:09 GMT; Path=/;'
]
}
ERROR requestWyyApi failed: {
status: 250,
body: {
loginType: 1,
code: 250,
message: '当前登录存在安全风险,请稍后再试'
},
cookie: [
'NMTID=00省略gA; Max-Age=315360000; Expires=Thu, 12 Aug 2032 03:36:09 GMT; Path=/;'
]
}
ERROR fetch cookie from response failed, uid(melody) login failed false
ERROR uid(melody) get cookie failed
ERROR request failed. false
尝试用服务器的ip在手机上登录后再尝试,还是不行。这怎么解决呢?
或许可以给个本地获取cookie的办法?然后把cookie填到json里,让melody直接使用,而不是通过登录?
这个项目太棒了,但可能是由于开发者个人使用的初衷,只支持上传音乐云盘,多少有些遗憾。
想提议的是,是否能支持更多上传源呢?
例如:
1.本地路径
2.Onedrive
3.GoogleDrive
4.Webdav
5.YouTube 音乐(可以无限制上传)
搜索结果只有一页,如果加个翻页功能就更好了。
感谢大佬优秀的项目,个人认为docker版更方便部署和管理
比如我收藏的这两个歌单
https://music.163.com/playlist?id=2811031169&userid=119862342
https://music.163.com/playlist?id=2961061456&userid=119862342
点击无反应,无法解锁,不知能否复现。
不能加入到歌单,用起来很不方便啊,就只能搜索了一个个点击播放。
希望有一个单独的页面,能够展示处理过的历史,不然有一些失败了也看不出来,也不知道哪些成功了
请问如何一键下载歌单?
比如 +1 999999
音乐列表不全, 尝试了好几次搜索, 暂时没有一首歌超过20条记录的
npm run init ─╯
[email protected] init
node scripts/setup.js
开始执行...
检查 media-get
开始下载核心程序 media-get
开始下载 media-get: https://github.com/foamzou/media-get/releases/download/v0.2.8/media-get-0.2.8-win.exe-arm64
download finished
再次检查 media-get 是否安装成功
media-get 安装失败。请手动从 https://github.com/foamzou/media-get/releases 下载最新版本到 /data/data/com.termux/files/home/melody/backend/bin/media-get
检查路径发现确实生成了media-get文件,但大小不符,只有200k,手动下载Linux-arm并移动到该路径,检查安装失败。
喜欢听歌的全小白,希望有app可以直接下载安装使用,谢谢你
现在下载的文件的名字,是一串无意义的字符串.
如果能在页面上解释到文件名,自动替换更好
b站有一个上传失败,同up主有成功上传
https://www.bilibili.com/video/BV1BY4y1i777
附部分日志
ℹ -------
ℹ searchSong with {"0":{"songName":"【萨克斯】转音注入灵魂~《月牙湾》F.I.R. "是谁的心啊,孤单地留下"","artist":"Leon_Music","album":"Bilibili"}}
ℹ cmdStr: /melody/backend/src/service/media_fetcher/../../../bin/media-get --searchSongName "【萨克斯】转音注入灵魂~《月牙湾》F.I.R. "是谁的心啊,孤单地留下"" --searchArtist "Leon_Music" --searchAlbum "Bilibili" --searchType="song" -m --infoFormat=json -l silence
ℹ -------
ℹ 0
ℹ -------
ℹ songName not matched, continue. 【萨克斯】转音注入灵魂~《月牙湾》F.I.R. "是谁的心啊,孤单地留下" vs 【萨克斯】转音注入灵魂~《月牙湾》F.I.R. "是谁的心啊,孤单地留下"
ℹ songName not matched, continue. 月牙湾 (Live) vs 【萨克斯】转音注入灵魂~《月牙湾》F.I.R. "是谁的心啊,孤单地留下"
Error: Cannot find module 'consola'
Require stack:
现在搜索页面很多是加锁状态的歌曲,是否可以开放一个手动上传音乐的入口呢
Melody,你的音乐精灵,旨在帮助你更好地管理音乐。目前的主要能力是帮助你将喜欢的歌曲或者音频上传到音乐平台的云盘。
刚刚出了Docker版,完美跑在openwrt,我觉得Melody完全可以更强大,直接作为本地私人播放器,解锁的音乐可以存在本地.不知道后续发展是否会走向这个功能.
After running: npm run init && npm run app
The following errors appear:
[email protected] init
node scripts/setup.js
开始执行...
检查 media-get
开始下载核心程序 media-get
node:events:505
throw er; // Unhandled 'error' event
^
Error: write EPROTO 4731999744:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (node:_http_client:454:9)
at TLSSocket.emit (node:events:527:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -100,
code: 'EPROTO',
syscall: 'write'
}
And enter http://127.0.0.1:5566/ into the browser, and it says:
127.0.0.1 refused to connect.
建议后续可通过修改配置或者页面的形式来选择高质量的音乐格式
ℹ fetchWithUrl params: {"0":"https://y.qq.com/n/ryqq/songDetail/004Z8Ihr0JIu5s","1":{"songName":"七里香","addMediaTag":false}} 12:41:22
ℹ start parse and download from https://y.qq.com/n/ryqq/songDetail/004Z8Ihr0JIu5s 12:41:22
ERROR exec error: Error: Command failed: /Users/.../melody/backend/src/service/media_fetcher/../../../bin/media-get -u "https://y.qq.com/n/ryqq/songDetail/004Z8Ihr0JIu5s" --out "/var/folders/5r/ct4_6f8j3zv8sx303l0jlvrc0000gn/T/melody-tmp-songs/d7070ce48106b02b1f4a700cdf000431/七里香.mp3" -t audio
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/foamzou/audio-get/utils.GetExtFromUrl(0x0, 0x0, 0x9, 0x144efbd)
github.com/foamzou/audio-get/utils/url.go:11 +0x175
github.com/foamzou/audio-get/processor.(*Processor).downloadAudio(0xc0001a1f68, 0xc0001fa000, 0xc0228dd2f1a9fbe7, 0x401d353f7ced9168)
github.com/foamzou/audio-get/processor/download.go:36 +0x55a
i fetchWithUrl params: {"0":"https://music.163.com/#/song?id=209043","1":{"songName":"优先权","addMediaTag":false}}
i start parse and download from https://music.163.com/#/song?id=209043
i C:\Users\garyc\Documents\Tools\Melody\melody\backend\src\service\media_fetcher/../../../bin/media-get.exe -u "https://music.163.com/#/song?id=209043" --out "C:\Users\garyc\AppData\Local\Temp\melody-tmp-songs/7556ca6b9b3772f877305218d7d90d10/优先权.mp3" -t audio
C:\Users\garyc\Documents\Tools\Melody\melody\backend\src\service\media_fetcher/../../../bin/media-get.exe [
'-u',
'"https://music.163.com/#/song?id=209043"',
'--out',
'"C:\Users\garyc\AppData\Local\Temp\melody-tmp-songs/7556ca6b9b3772f877305218d7d90d10/优先权.mp3"',
'-t',
'audio',
''
]
i -------
i 0
i invalid argument for flag `/o, /out' (expected string): invalid syntax
i -------
问个很蠢的问题,docker启动后,“填写你的 Melody Key”,这个Melody Key在哪里找,我设置了accounts.json中的account和password,依然无法进入,提示我Melody不正确?
功能描述
现在音乐只是下载到/tmp目录,上传到云盘后就自动删除了。建议支持一键将歌单中所有音乐,下载MP3到本地,用作本地存储。
为什么需要该功能
在版权越来越严格的前提下,很多APP都有自己格式的音乐格式,不再提供通用MP3格式文件,不方便离线听取。
你能想到的解决方案
既然内部已经有获取网易云歌单列表和下载MP3的逻辑,建议增加一个「一键下载MP3到本地」的功能,方便离线存储。
希望通过账号直接登录,想加个人,还要加个密钥,感觉优点麻烦,密钥有点记不住
这个只能上传到网易云盘吗?可以上传到其他云盘吗?比如阿里、或服务器本地、或webdav。
设备环境:Android 13,ARM64,Termux 0.118
Node 版本:18.4.0
在前端搜索界面输入字符搜索,报错如下:
ERROR catch error Cannot read properties of null (reading 'map')
at searchSongFromAllPlatform (backend/src/service/media_fetcher/index.js:120:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async searchSongsWithKeyword (backend/src/service/search_songs/index.js:6:24)
at async search (backend/src/handler/songs.js:22:17)
ℹ searchSong with {"0":{"keyword":"十年"}}
ℹ cmdStr: /data/data/com.termux/files/home/melody/backend/src/service/media_fetcher/../../../bin/media-get -k " 十年" --searchType="song" -m --infoFormat=json -l silence
/data/data/com.termux/files/home/melody/backend/src/service/media_fetcher/../../../bin/media-get [
'-k',
'"十年"',
'--searchType="song"',
'-m',
'--infoFormat=json',
'-l',
'silence'
]
ℹ -------
ℹ 0
ℹ -------
ERROR catch error Cannot read properties of null (reading 'map')
at searchSongFromAllPlatform (backend/src/service/media_fetcher/index.js:120:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async searchSongsWithKeyword (backend/src/service/search_songs/index.js:6:24)
at async search (backend/src/handler/songs.js:22:17)
此外,在安装时也会出现 media-get 安装失败的提示,即便手动下载到对应目录也会在「检查 media-get 是否安装成功」过程中报错。该问题通过删除 script/setup.js 相关检测可解决。
自动播放下一首功能,随机播放,循环播放
打开网页搜索时的log:
ℹ [media-get] Version: 0.2.7
ℹ [tmp path] use /tmp/melody-tmp-songs
ℹ Express server is listening on :::5566!
ℹ searchSong with {"0":{"keyword":"fade"}}
ℹ cmdStr: /app/backend/src/service/media_fetcher/../../../bin/media-get -k "fade" --searchType="song" -m --infoFormat=json -l silence
/app/backend/src/service/media_fetcher/../../../bin/media-get [
'-k',
'"fade"',
'--searchType="song"',
'-m',
'--infoFormat=json',
'-l',
'silence'
]
ℹ -------
ℹ 0
ℹ -------
ℹ searchSong with {"0":{"keyword":"fade"}}
ℹ cmdStr: /app/backend/src/service/media_fetcher/../../../bin/media-get -k "fade" --searchType="song" -m --infoFormat=json -l silence
/app/backend/src/service/media_fetcher/../../../bin/media-get [
'-k',
'"fade"',
'--searchType="song"',
'-m',
'--infoFormat=json',
'-l',
'silence'
]
ℹ -------
ℹ 0
ℹ -------
进入容器后执行 /app/backend/src/service/media_fetcher/../../../bin/media-get -k "fade" --searchType="song" -m --infoFormat=json -l debug
结果为:
/app# /app/backend/src/service/media_fetcher/../../../bin/media-get -k "fade" --searchType="song" -m --infoFormat=json -l debug
Will search in [bilibili douyin kugou kuwo migu netease qq youtube qmkg]
http code should be 200, got 412
Get "https://www.youtube.com/results?search_query=fade": dial tcp 172.217.160.78:443: i/o timeout
[
{
"Name": "Fade",
"Artist": "Janji",
"Album": "Football House",
"Duration": 0,
"Url": "https://music.migu.cn/v3/music/song/6999071YMKK",
"ResourceForbidden": false,
"Source": "migu",
"FromMusicPlatform": true,
"Score": 640.803
},
{
"Name": "Fade",
"Artist": "Sophie Zelmani",
"Album": "Decade of dreams 1995-2005",
"Duration": 0,
"Url": "https://music.migu.cn/v3/music/song/6005971ASJ3",
"ResourceForbidden": false,
"Source": "migu",
"FromMusicPlatform": true,
"Score": 429.792
},
{
"Name": "Fade",
"Artist": "Sophie Zelmani",
"Album": "Bright Eyes",
"Duration": 0,
"Url": "https://music.migu.cn/v3/music/song/6005660D6Y4",
"ResourceForbidden": false,
"Source": "migu",
"FromMusicPlatform": true,
"Score": 429.792
},
{
"Name": "",
"Artist": "",
"Album": "",
"Duration": 0,
"Url": "https://www.douyin.com/video/",
"ResourceForbidden": false,
"Source": "douyin",
"FromMusicPlatform": false,
"Score": 330
},
{
"Name": "Fade",
"Artist": "Alan Walker",
"Album": "NCS: Uplifting",
"Duration": 264,
"Url": "https://music.163.com/#/song?id=33887932",
"ResourceForbidden": false,
"Source": "netease",
"FromMusicPlatform": true,
"Score": 46.2
},
{
"Name": "Fade",
"Artist": "Alan Walker",
"Album": "Origins",
"Duration": 264,
"Url": "https://music.163.com/#/song?id=29947420",
"ResourceForbidden": false,
"Source": "netease",
"FromMusicPlatform": true,
"Score": 46.2
},
{
"Name": "Fade",
"Artist": "Alan Walker",
"Album": "Origins",
"Duration": 264,
"Url": "https://y.qq.com/n/ryqq/songDetail/001l8CjG0HDdV6",
"ResourceForbidden": false,
"Source": "qq",
"FromMusicPlatform": true,
"Score": 46.2
},
{
"Name": "Fade",
"Artist": "Alan Walker",
"Album": "Fade",
"Duration": 264,
"Url": "https://www.kugou.com/song/#hash=8ef8c2da65712d41d8d507d34578d617\u0026album_id=590859",
"ResourceForbidden": false,
"Source": "kugou",
"FromMusicPlatform": true,
"Score": 46.2
},
{
"Name": "Fade",
"Artist": "Alan\u0026nbsp;Walker",
"Album": "Fade",
"Duration": 262,
"Url": "https://www.kuwo.cn/play_detail/6245379",
"ResourceForbidden": false,
"Source": "kuwo",
"FromMusicPlatform": true,
"Score": 40.612
},
{
"Name": "Fade\u0026nbsp;(cover:\u0026nbsp;Alan\u0026nbsp;Walker)",
"Artist": "左旺",
"Album": "",
"Duration": 1963,
"Url": "https://www.kuwo.cn/play_detail/151260304",
"ResourceForbidden": false,
"Source": "kuwo",
"FromMusicPlatform": true,
"Score": 11.936
},
{
"Name": "《Fade》封神之作。现象级电音神作,多少人听了这首神曲而入坑!",
"Artist": "暮瞳",
"Album": "",
"Duration": 268,
"Url": "https://www.douyin.com/video/6844324142251019527",
"ResourceForbidden": false,
"Source": "douyin",
"FromMusicPlatform": false,
"Score": 11.543000000000001
},
{
"Name": "11岁男孩用双排键弹奏世界冠军级电子音乐《Fade》高手在民间",
"Artist": "三度艺术空间-双排键",
"Album": "",
"Duration": 388,
"Url": "https://www.douyin.com/video/7118264710213946658",
"ResourceForbidden": false,
"Source": "douyin",
"FromMusicPlatform": false,
"Score": 11.448
},
{
"Name": "Faded",
"Artist": "Alan Walker",
"Album": "Faded",
"Duration": 212,
"Url": "https://music.163.com/#/song?id=36990266",
"ResourceForbidden": false,
"Source": "netease",
"FromMusicPlatform": true,
"Score": 4.082
},
{
"Name": "Faded",
"Artist": "Alan Walker",
"Album": "Different World",
"Duration": 212,
"Url": "https://y.qq.com/n/ryqq/songDetail/004XCNCu3tl6fg",
"ResourceForbidden": false,
"Source": "qq",
"FromMusicPlatform": true,
"Score": 4.082
},
{
"Name": "Faded",
"Artist": "Alan Walker",
"Album": "Faded",
"Duration": 212,
"Url": "https://www.kugou.com/song/#hash=5605427423a1e89443d11b4afe3c87f2\u0026album_id=2657404",
"ResourceForbidden": false,
"Source": "kugou",
"FromMusicPlatform": true,
"Score": 4.082
},
{
"Name": "Fade(褪色)",
"Artist": "Alan Walker",
"Album": "做好听的电音",
"Duration": 262,
"Url": "https://y.qq.com/n/ryqq/songDetail/001onNhB0PFXsY",
"ResourceForbidden": false,
"Source": "qq",
"FromMusicPlatform": true,
"Score": 3.4640000000000004
},
{
"Name": "Alan Walker-Fade(马里奥赛德 电子交响乐mix)",
"Artist": "Alan\u0026nbsp;Walker\u0026马里奥赛德",
"Album": "Fade(Remix)",
"Duration": 239,
"Url": "https://www.kuwo.cn/play_detail/28112384",
"ResourceForbidden": false,
"Source": "kuwo",
"FromMusicPlatform": true,
"Score": 1.463
},
{
"Name": "Faded",
"Artist": "Alan Walker、Iselin Solheim",
"Album": "Feel My Collect Song",
"Duration": 212,
"Url": "https://www.kugou.com/song/#hash=f13cf985390a07f973d177c14dd832e5\u0026album_id=7536462",
"ResourceForbidden": true,
"Source": "kugou",
"FromMusicPlatform": true,
"Score": -17.081999999999997
}
]
---------------------------App end----------------------------
Alloc = 2 MiB TotalAlloc = 54 MiB Sys = 30 MiB NumGC = 12
--------------------------------------------------------------
Cost time: 4.888150742s
开始执行...
检查 media-get
当前 media-get 版本已经是最新版本
检查 media-get 是否更新成功
安装 node_module
����: �Ҳ��������������� install
����: �Ҳ��������������� install
编译前端
����: �Ҳ��������������� run
删除老目录
拷贝前端目录
执行完毕,执行以下命令启动服务:
npm run app
(node:11068) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use node --trace-deprecation ...
to show where the warning was created)
[email protected] app
node backend/src/index.js
D:\develop\other\melody\backend\src\service\media_fetcher/../../../bin/media-get.exe [ '-h' ]
i [media-get] Version: 0.2.6 18:12:49
i [tmp path] use C:\Users\Jios\AppData\Local\Temp\melody-tmp-songs 18:12:49
i Express server is listening on :::5566! 18:12:50
安装到最后,浏览器输入http://127.0.0.1:5566/,页面就是这个提示Cannot GET /,F12出来这页面是404,这个怎么处理。
ERROR getMetaWithUrl failed with https://www.kuwo.cn/play_detail/146783118, err: panic: invalid character 'æ' looking for beginning of value
goroutine 1 [running]:
main.main()
./main.go:24 +0xab
ℹ getMetaWithUrl from https://y.qq.com/n/ryqq/songDetail/000T1Ws32MWrUj
/app/backend/src/service/media_fetcher/../../../bin/media-get [
'-u',
'"https://y.qq.com/n/ryqq/songDetail/000T1Ws32MWrUj"',
'-m',
'--infoFormat=json'
]
ℹ -------
ℹ 2
ℹ -------
ERROR getMetaWithUrl failed with https://y.qq.com/n/ryqq/songDetail/000T1Ws32MWrUj, err: panic: can not get song url
goroutine 1 [running]:
main.main()
./main.go:24 +0xab
搜索,播放仅此
看了下项目的dockerfile,感觉非常适合借助 GitHub Actions 的能力,自动构建docker镜像,而且还能自动构建多架构平台支持的镜像,这样会省心非常多。
这个是我一个前端项目的配置文件: https://github.com/eryajf/go-ldap-admin-ui/blob/main/.github/workflows/docker-image.yml
可以简单更改就能投入使用,当然,如果需要我补充这个PR,我也非常乐意效劳!
输入链接能显示这个视频,但是播放的按钮全部是灰的
QQ音乐有会员 但是 用网易用的多 希望能添加登录其他音乐平台登录获取高品质音频文件 然后解锁网易云
ERROR uid(admin)'s loginType(固定为:phone,目前仅支持手机号+密码登录。下面为示例) does not support now
ERROR uid(admin) get cookie failed
ERROR request failed. false
ℹ uid(admin)'s cookie not found from .profile
ℹ uid(admin) login...
ERROR uid(admin)'s loginType(固定为:phone,目前仅支持手机号+密码登录。下面为示例) does not support now
ERROR uid(admin) get cookie failed
ERROR request failed. false
ℹ uid(admin)'s cookie not found from .profile
ℹ uid(admin) login...
网页端没有下载功能吗?
附日志:
ℹ -------
ℹ searchSong with {"0":{"keyword":"光辉岁月"}}
ℹ cmdStr: /app/backend/src/service/media_fetcher/../../../bin/media-get -k "光辉岁月" --searchType="song" -m --infoFormat=json -l silence
ℹ -------
ℹ 0
ℹ -------
ℹ getMetaWithUrl from https://www.kuwo.cn/play_detail/19534401
ERROR exec error: Error: Command failed: /app/backend/src/service/media_fetcher/../../../bin/media-get -u "https://www.kuwo.cn/play_detail/19534401" -m --infoFormat=json
panic: invalid character 'æ' looking for beginning of value
goroutine 1 [running]:
main.main()
command-line-arguments/main.go:24 +0xd0
ℹ -------
ℹ 2
ℹ Command failed: /app/backend/src/service/media_fetcher/../../../bin/media-get -u "https://www.kuwo.cn/play_detail/19534401" -m --infoFormat=json
panic: invalid character 'æ' looking for beginning of value
goroutine 1 [running]:
main.main()
command-line-arguments/main.go:24 +0xd0
ℹ -------
ERROR getMetaWithUrl failed with https://www.kuwo.cn/play_detail/19534401, err: Command failed: /app/backend/src/service/media_fetcher/../../../bin/media-get -u "https://www.kuwo.cn/play_detail/19534401" -m --infoFormat=json
panic: invalid character 'æ' looking for beginning of value
goroutine 1 [running]:
main.main()
command-line-arguments/main.go:24 +0xd0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.