跳到主要内容

歌词确认 / Tag编辑器

修改音乐文件Tag,支持AAC、APEv2、AIFF、ASF、DSF、ID3、FLAC、VORBIS、WAVE等标签格式的修改。此部分功能实现参考Music-tag-web项目。

支持写入标题、艺术家、专辑、年份、封面图片等标签信息。

API详情​

请求和响应​

  • 请求路径: /tag、/confirm

  • 请求方式: GET、POST、PUT

  • 请求权限:rw

  • 请求体

      {
    "tracktitle": "Track Title",
    "artist": "Artists",
    "album": "Albums",
    "year": "Album year",
    "lyrics": "Lyrics text"
    }

    说明:变量类型见以下要求;值为false代表删除,值为None代表保留。

      supported_tags = {
    "tracktitle": {"allow": (str, bool, type(None)), "caption": "Track Title"},
    "artist": {"allow": (str, bool, type(None)), "caption": "Artists"},
    "album": {"allow": (str, bool, type(None)), "caption": "Albums"},
    "year": {"allow": (int, bool, type(None)), "caption": "Album year"},
    "lyrics": {"allow": (str, bool, type(None)), "caption": "Lyrics text"}
    }
  • 响应

    状态码含义
    200修改成功
    404未找到文件
    524传入JSON变量类型有误
    500未知错误,具体内容参考响应文本