歌曲管理
批量添加网络歌曲
批量添加网络歌曲到数据库。cover_url 支持以 "/" 开头的相对路径(插件场景下由服务端自动解析为内部 URL,与歌词 lyric_remote_url 的解析机制一致)。lyric_remote_url 为歌词远程 URL 直传字段,提供时优先于 lyric + lyric_source=url 的间接方式。副作用:插入成功后,对缺失技术元数据(duration/bitrate/samplerate/format)的歌曲异步探测补齐(限并发后台执行,不阻塞响应),确保 WebDAV 等无法自带时长的音源在首次播放前就落库 duration,供音箱等仅依赖服务端时长的消费端自动切歌。
post/songs/remote
Request body
Response
添加成功
Example response
{
"songs": [
{
"added_at": "2024-01-01T12:00:00Z",
"album": "十一月的萧邦",
"artist": "周杰伦",
"bit_rate": 320,
"cover_url": "https://example.com/cover.jpg",
"duration": 253.5,
"file_path": "/music/周杰伦/夜曲.mp3",
"file_size": 10485760,
"format": "mp3",
"genre": "Pop",
"id": 1,
"language": "国语",
"plugin_entry_path": "my-source",
"sample_rate": 44100,
"style": "抒情",
"title": "夜曲",
"track": "3/12",
"type": "local",
"updated_at": "2024-01-01T12:00:00Z",
"url": "https://example.com/song.mp3",
"year": 2005
}
]
}