Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/updates #75

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/02.metadata-repository/01.folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
│ └── @META-DUPLICATED
│ ├── @META-DUPLICATED.0.toml
│ └── @META-DUPLICATED.1.toml
── tag
── tag
│ └── [Anime] 神様になった日.toml
├── .repo
│ └── [Undefined Structure]
├── repo.toml
```

专辑存放的目录由 repo.toml 指定。
- 专辑存放的目录由 `repo.toml` 指定,默认为 `album`
- 标签存放的目录为 `tag`,该目录下所有的 `toml` 文件(不包含子目录)都会被认为是描述标签信息的文件
- `.repo` 目录是由 `anni` 生成的,仅用于缓存的目录结构
- 结构未定义,由 `anni` 实现自行决定
- 在发布时不应该带上该目录
1 change: 1 addition & 0 deletions src/02.metadata-repository/02.album-information.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ catalog = "KSLA-0178"
# 专辑艺术家 [必填项]
#
# 使用「Anni 艺术家别名嵌套」格式表示具体的艺术家。
# 该字段只有在值为 `[Unknown Artist]` 时才会自动和碟片中的艺术家合并。
artist = "やなぎなぎ"
#
# 专辑的发行日期 [必填项][DATE]
Expand Down
26 changes: 22 additions & 4 deletions src/05.audio-library/01.protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> ⚠️️ 在协议版本迈入 `1.0` 之前,任何改动都有可能发生。
最后修改:2022 年 05 月 10 日
协议版本:0.4.1
协议版本:0.5.0

## 定义

Expand Down Expand Up @@ -91,6 +91,8 @@ Access-Control-Allow-Origin: *

## 音频仓库信息

> ⚠️️ 该接口后续可能会被移除
获取音频仓库信息的 `API` 定义为 `GET /info`,所有用户都可以请求。

返回结果如下例:
Expand All @@ -102,10 +104,19 @@ Access-Control-Allow-Origin: *
"version": "Annil v0.1.0",
// 当前运行的 Annil 音频仓库协议版本
// 用于客户端比对其支持的能力
"protocol_version": "0.2.1",
"protocol_version": "0.5.0",
// 音频仓库最近一次数据更新时间
// 用于客户端缓存 `/albums` 请求结果
"last_update": 1639631487
"last_update": 1639631487,
// 音频仓库中音频资源的元数据源
"metadata": {
// 该仓库的链接
"repo": "https://github.com/ProjectAnni/repo",
// [可选][二选一] 该仓库对应的 Annim 服务器地址
"server": "https://annim.server",
// [可选][二选一] 该仓库对应的构建数据源下载路径
"db": "https://db-server/db"
}
}
```

Expand All @@ -129,7 +140,14 @@ Access-Control-Allow-Origin: *
]
```

`Anni` 音频仓库协议**建议**音频仓库在响应中携带 `ETag` 头部,以便客户端缓存。
该返回会携带以下附加头部:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议区分 MUST 和 RECOMMEND


| Key | 含义 |
| ------------------- | ---------------------------------------- |
| `X-Metadata-Repo` |`metadata.repo` 相同 |
| `X-Metadata-Server` |`metadata.server` 相同 |
| `X-Metadata-DB` |`metadata.db` 相同 |
| `ETag` | Annil 实际包含的资源指纹,用于客户端缓存 |

### 客户端实现指导

Expand Down
41 changes: 0 additions & 41 deletions src/05.audio-library/04.annil-track-extension.md

This file was deleted.

1 change: 0 additions & 1 deletion src/50.anni-cli/05.workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ root = "/home/yesterday17/Music"
- [x] `-u`, `--uuid`:通过 `Album ID` 而非专辑路径发布专辑
- [x] `-s`, `--soft`:在专辑发布时,采用移动+软删除的方式替代直接移动目录。发布结束后,专辑状态变更为**已发布**。工作目录中仍然会保留专辑信息,但用户目录中的专辑会被移除。


### fsck

修复一些常见的工作空间问题。
Expand Down
1 change: 0 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
- [Anni 音频仓库协议](./05.audio-library/01.protocol.md)
- [不同的音频仓库实现](./05.audio-library/02.implements.md)
- [annil-rs](./05.audio-library/03.annil-rs.md)
- [[Draft] Annil 音轨扩展](./05.audio-library/04.annil-track-extension.md)
- [管理后端 Anniv](./06.anniv/00.readme.md)
- [基本信息](./06.anniv/01.info.md)
- [用户系统](./06.anniv/02.user.md)
Expand Down