删除song_playlist_relation表中rcmd_reason字段
This commit is contained in:
parent
d17f4282e4
commit
b4af23b381
@ -249,7 +249,6 @@ CREATE TABLE `song_playlist_relation` (
|
||||
`song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id',
|
||||
`playlist_id` int(10) UNSIGNED NOT NULL COMMENT '歌单id',
|
||||
`alg` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保留字段',
|
||||
`rcmd_reason` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保留字段',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
|
||||
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
|
||||
PRIMARY KEY (`song_id`, `playlist_id`) USING BTREE,
|
||||
|
@ -106,7 +106,6 @@ CREATE TABLE `song_playlist_relation` (
|
||||
`song_id` int(10) unsigned NOT NULL COMMENT '歌曲id',
|
||||
`playlist_id` int(10) unsigned NOT NULL COMMENT '歌单id',
|
||||
`alg` varchar(20) DEFAULT NULL COMMENT '保留字段',
|
||||
`rcmd_reason` varchar(20) DEFAULT NULL COMMENT '保留字段',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
|
||||
`modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
|
||||
PRIMARY KEY (`song_id`, `playlist_id`),
|
||||
|
@ -198,7 +198,7 @@ module.exports = {
|
||||
song_playlist: {
|
||||
insertCollection: async (trackIds) => {
|
||||
if (trackIds.length == 0) return;
|
||||
return await dbUtils.query('INSERT IGNORE INTO song_playlist_relation (song_id, playlist_id, alg, rcmd_reason) VALUES ?', [trackIds]);
|
||||
return await dbUtils.query('INSERT IGNORE INTO song_playlist_relation (song_id, playlist_id, alg) VALUES ?', [trackIds]);
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -177,7 +177,7 @@ async function fetch({ playlistId, debug = false }) {
|
||||
}
|
||||
|
||||
await dataManager.wait_check.insert("song", playlist.trackIds.map(track => track.id));
|
||||
let trackIds = playlist.trackIds.map(track => [track.id, playlist.id, track.alg, track.rcmdReason]);
|
||||
let trackIds = playlist.trackIds.map(track => [track.id, playlist.id, track.alg]);
|
||||
await dataManager.song_playlist.insertCollection(trackIds);
|
||||
await dataManager.playlist.insertCollection(playlistInfo);
|
||||
}
|
||||
|
@ -1,28 +1,8 @@
|
||||
本地
|
||||
auto.bat
|
||||
|
||||
windows服务器
|
||||
cd C:\Users\Administrator\Desktop\tools\netease_music
|
||||
node index --utils album --min 10000000 --limit 1000 --order asc
|
||||
node index --utils album --limit 1000 --order desc
|
||||
node index --utils artist --limit 1000 --order desc
|
||||
node index --utils artist --min 30000000 --limit 1000 --order asc
|
||||
|
||||
linux服务器
|
||||
cd /www/neteasemusic/tools
|
||||
node index --utils album --min 70000000 --limit 1000
|
||||
node index --utils album --min 80000000 --limit 1000
|
||||
node index --utils album --min 90000000 --limit 1000
|
||||
node index --utils album --min 100000000 --limit 1000
|
||||
|
||||
hifini
|
||||
linux服务器
|
||||
node index --limit 200,50
|
||||
node index --limit 100,50
|
||||
node index --limit 100,50 --order desc
|
||||
Windows server
|
||||
node index --limit 200,50 --order desc
|
||||
|
||||
|
||||
|
||||
本地库测试
|
||||
@ -46,8 +26,6 @@ node index --database neteasemusic_develop --utils assistant
|
||||
|
||||
|
||||
后期:
|
||||
删除song_playlist_relation表中rcmd_reason字段(全是空字符串)
|
||||
|
||||
歌单定时更新(rel表中添加一个del字段,先将歌单下面的全部置为删除状态,再插入的时候把已有歌曲的标记重新修改为正常状态)
|
||||
|
||||
评论的更新
|
||||
|
Loading…
Reference in New Issue
Block a user