Skip to content

Commit b8a1b35

Browse files
committed
[feat] 增加 杜比全景声(svip) 音质
1 parent 61c5158 commit b8a1b35

File tree

7 files changed

+24
-18
lines changed

7 files changed

+24
-18
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- 个人建议领个7天的会员礼品卡把歌单的歌都用云盘解锁了。
1919
- 听歌量打卡
2020
- 快速完成每日300首歌曲的等级任务。助力早日Lv10。
21-
- 不影响个性化推荐。
21+
- 不影响个性化推荐、听歌记录、年度总结
2222
- 高音质试听:
2323
- 解除网页端只能听标准音质的限制。
2424
- 支持超清母带。
@@ -42,11 +42,12 @@
4242
- 可先编辑需要在云盘显示的歌手,专辑信息再上传。
4343
- 云盘导入导出
4444
- 云盘歌曲导入另一账号。和云盘快传相同原理。
45+
### 使用说明
46+
脚本安装完成后,登陆网易云音乐网页端。在右上角用户头像的 `个人主页` 中,使用云盘相关功能。在单曲、专辑、歌单(并非`我的音乐`的歌单,而是 `个人主页` 的歌单)页面使用下载、转存云盘功能。
4547
### 问题说明
4648
- 云盘快传:少部分音源内容残缺,歌曲与音源可能不对应。存在许多用AI提升的咪咕24bit音源。
4749
- 云盘快传\转存:无损以上音质文件(flac)上传后再下载文件名后缀变为mp3,但不会影响文件的音质。
4850
- 上传失败时,浏览器控制台(F12)有输出具体错误内容。大多数时候重试一次就好了。
49-
- 不要从 `我的音乐` 里浏览歌单,请从右上角用户头像的 `个人主页` 里再进入具体的歌单。
5051
- 云盘音质提升:当目标高音质文件已在云盘中时,提升音质只是把高音质文件匹配到目标歌曲,然后删除低音质文件。这就造成云盘歌曲数量减少的现象。
5152
### 截图
5253
<img src="https://raw.githubusercontent.com/Cinvin/myuserscripts/main/screenshot/ncmHomePage.png" width="60%">

ncmExtend/src/PopUpUI/ShowBatchDLPopUp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const ShowBatchDLPopUp = (config) => {
2121
<label><input class="form-check-input" type="checkbox" value="" id="cb-dlLyric">下载歌词文件(.lrc)</label>
2222
</div>
2323
<div id="my-level">
24-
<label>优先下载音质<select id="level-select" class="swal2-select"><option value="lossless">无损</option><option value="hires">Hi-Res</option><option value="jymaster" selected="">超清母带</option><option value="exhigh">极高</option></select></label>
24+
<label>优先下载音质<select id="level-select" class="swal2-select"><option value="jymaster" selected="">超清母带</option><option value="dolby">杜比全景声</option><option value="sky">沉浸环绕声</option><option value="jyeffect">高清环绕声</option><option value="hires">Hi-Res</option><option value="lossless">无损</option><option value="exhigh">极高</option></select></label>
2525
</div>
2626
<div id="my-out">
2727
<label>文件命名格式<select id="out-select" class="swal2-select"><option value="artist-title" selected="">歌手 - 歌曲名</option><option value="title">歌曲名</option><option value="title-artist">歌曲名 - 歌手</option></select></label>

ncmExtend/src/PopUpUI/ShowBatchDLULPopUp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const ShowBatchDLULPopUp = (config) => {
1212
<labe><input class="form-check-input" type="checkbox" value="" id="cb-fee0">免费歌曲</label>
1313
</div>
1414
<div id="my-level">
15-
<label>优先转存音质<select id="level-select" class="swal2-select"><option value="lossless">无损</option><option value="hires">Hi-Res</option><option value="jymaster" selected="">超清母带</option><option value="exhigh">极高</option></select></label>
15+
<label>优先转存音质<select id="level-select" class="swal2-select"><option value="jymaster" selected="">超清母带</option><option value="dolby">杜比全景声</option><option value="sky">沉浸环绕声</option><option value="jyeffect">高清环绕声</option><option value="hires">Hi-Res</option><option value="lossless">无损</option><option value="exhigh">极高</option></select></label>
1616
</div>
1717
<div id="my-out">
1818
<label>文件命名格式<select id="out-select" class="swal2-select"><option value="artist-title" selected="">歌手 - 歌曲名</option><option value="title">歌曲名</option><option value="title-artist">歌曲名-歌手</option></select></label>

ncmExtend/src/commentBox.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,28 @@ export const addCommentWithCumstomIP = (commentBox) => {
8282
},
8383
confirmButtonText: '发送评论',
8484
showCloseButton: true,
85-
footer: `<div>可参考:<a href="https://zh-hans.ipshu.com/country-list" target="_blank">IP 国家/地区列表</a></div>`,
85+
footer: `
86+
<div>可参考:<a href="https://zh-hans.ipshu.com/country-list" target="_blank">IP 国家/地区列表</a></div>
87+
<div>需不显示属地请填 <b>127.0.0.1</b></div>
88+
`,
8689
})
8790
.then(result => {
8891
if (result.isConfirmed) {
8992
GM_setValue('lastIPValue', result.value)
9093
weapiRequest('/api/resource/comments/add', {
91-
data:{
94+
data: {
9295
threadId: threadId,
93-
content:content,
96+
content: content,
9497
},
95-
ip:result.value,
96-
onload: (res)=> {
98+
ip: result.value,
99+
cookie: true,
100+
onload: (res) => {
97101
console.log(res)
98-
if(res.code == 200){
102+
if (res.code == 200) {
99103
showConfirmBox('评论成功,请刷新网页查看')
100104
}
101-
else{
102-
showConfirmBox('评论失败,'+ JSON.stringify(res))
105+
else {
106+
showConfirmBox('评论失败,' + JSON.stringify(res))
103107
}
104108
}
105109
})

ncmExtend/src/song/songDetail.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ class SongDetail {
7171
}
7272
const channel = 'pl'
7373
if (songDetail.jm && songPlWeight >= 7) { const desc = `${Math.round(songDetail.jm.br / 1000)}k\t${fileSizeDesc(songDetail.jm.size)}\t${songDetail.jm.sr / 1000}kHz`; const level = 'jymaster'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
74+
if (songDetail.db && songPlWeight >= 7) { const desc = `${Math.round(songDetail.db.br / 1000)}k\t${fileSizeDesc(songDetail.db.size)}\t${songDetail.db.sr / 1000}kHz`; const level = 'dolby'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
7475
if (songDetail.sk && songPlWeight >= 7) { const desc = `${Math.round(songDetail.sk.br / 1000)}k\t${fileSizeDesc(songDetail.sk.size)}\t${songDetail.sk.sr / 1000}kHz`; const level = 'sky'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
75-
if (songDetail.hr && songPlWeight >= 4) { const desc = `${Math.round(songDetail.hr.br / 1000)}k\t${fileSizeDesc(songDetail.hr.size)}\t${songDetail.hr.sr / 1000}kHz `; const level = 'hires'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
7676
if (songDetail.je && songPlWeight >= 4) { const desc = `${Math.round(songDetail.je.br / 1000)}k\t${fileSizeDesc(songDetail.je.size)}\t${songDetail.je.sr / 1000}kHz`; const level = 'jyeffect'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
77+
if (songDetail.hr && songPlWeight >= 4) { const desc = `${Math.round(songDetail.hr.br / 1000)}k\t${fileSizeDesc(songDetail.hr.size)}\t${songDetail.hr.sr / 1000}kHz `; const level = 'hires'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
7778
if (songDetail.sq && songPlWeight >= 4) { const desc = `${Math.round(songDetail.sq.br / 1000)}k ${fileSizeDesc(songDetail.sq.size)}\t${songDetail.sq.sr / 1000}kHz`; const level = 'lossless'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
7879
if (songDetail.h && songPlWeight >= 3) { const desc = `${Math.round(songDetail.h.br / 1000)}k ${fileSizeDesc(songDetail.h.size)}`; const level = 'exhigh'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }
7980
if (songDetail.m && songPlWeight >= 2) { const desc = `${Math.round(songDetail.m.br / 1000)}k ${fileSizeDesc(songDetail.m.size)}`; const level = 'higher'; this.createDLRow(desc, level, channel); this.createULRow(desc, level, channel) }

ncmExtend/src/utils/constant.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
export const levelOptions = { jymaster: '超清母带', sky: '沉浸环绕声', jyeffect: '高清环绕声', hires: 'Hi-Res', lossless: '无损', exhigh: '极高', higher: '较高', standard: '标准' }
3-
export const levelWeight = { jymaster: 8, sky: 7, jyeffect: 6, hires: 5, lossless: 4, exhigh: 3, higher: 2, standard: 1, none: 0 }
2+
export const levelOptions = { jymaster: '超清母带',dolby: '杜比全景声', sky: '沉浸环绕声', jyeffect: '高清环绕声', hires: 'Hi-Res', lossless: '无损', exhigh: '极高', higher: '较高', standard: '标准' }
3+
export const levelWeight = { jymaster: 9, dolby:8, sky: 7, jyeffect: 6, hires: 5, lossless: 4, exhigh: 3, higher: 2, standard: 1, none: 0 }
44
export const defaultOfDEFAULT_LEVEL = 'jymaster'
55
export const uploadChunkSize = 8 * 1024 * 1024
66
export const songMark = { explicit: 1048576 }

ncmExtend/src/utils/request.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { weapi } from "./crypto";
2-
const appendCookie = 'os=android;appver=9.1.10'
3-
2+
const androidCookie = 'os=android;appver=9.1.10;channel=netease;osver=14;buildver=240628144636'
3+
const pcCookie ='os=pc;appver=3.0.13'
44
export const weapiRequest = (url, config) => {
55
let data = config.data || {}
66
let csrfToken = document.cookie.match(/_csrf=([^(;|$)]+)/)
@@ -16,7 +16,7 @@ export const weapiRequest = (url, config) => {
1616
method: "POST",
1717
responseType: "json",
1818
headers: headers,
19-
cookie: config.cookie || appendCookie,
19+
cookie: config.cookie || pcCookie,
2020
data: `params=${encodeURIComponent(encRes.params)}&encSecKey=${encodeURIComponent(encRes.encSecKey)}`,
2121
onload: res => { config.onload(res.response) },
2222
onerror: config.onerror,

0 commit comments

Comments
 (0)