歌曲管理

批量设置歌曲评级

Changed on

按 ID 列表批量设置评级(0-100;0 表示清除评级)。列表中不存在的 ID 静默跳过,updated 返回实际更新数量。评级仅存数据库,不写入音频文件标签。

post/songs/batch-rating

Request

  • Base URL
    https://localhost:58091/api/v1
  • Auth
    API key in header Authorization

Request body

idsinteger[]

要设置评级的歌曲 ID 列表

ratinginteger

评级值 0-100(0 表示清除评级;星级客户端按 20/颗映射)

Example request

{
  "ids": [
    1
  ],
  "rating": 80
}

Response

成功返回 {updated}

updatedinteger

实际更新的歌曲数量(不存在的 ID 静默跳过)

Example response

{
  "updated": 2
}

Changes