Skip to content

Commit 178a290

Browse files
authored
merge: Update codebase (#261)
2 parents c4fa1a7 + b7dcb4c commit 178a290

File tree

29 files changed

+239
-180
lines changed

29 files changed

+239
-180
lines changed

.github/workflows/napi-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
- uses: actions/checkout@v3
206206
- name: Build
207207
id: build
208-
uses: vmactions/freebsd-vm@v0.2.9
208+
uses: vmactions/freebsd-vm@v0.3.0
209209
env:
210210
DEBUG: napi:*
211211
RUSTUP_HOME: /usr/local/rustup

Cargo.lock

Lines changed: 44 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ N-API 和 RESTful API 支援的引擎(以下簡稱「預設引擎集」)與
104104
| Bilbili Music | `bilibili` | ||
105105
| 酷狗音乐 | `kugou` | ||
106106
| 酷我音乐 | `kuwo` | 目前僅支援 320kbps MP3 ||
107-
| 咪咕音乐 | `migu` | | |
107+
| 咪咕音乐 | `migu` | | |
108108
| JOOX | `joox` | 需要設定 `joox:cookie`,見引擎文件。 ||
109109
| YtDl | `ytdl` | 預設使用的 `youtube-dl` 後端是 `yt-dlp`,可設定 `ytdl:exe` 調整 ||
110110
| 第三方網易雲 API | `pyncm` | ||
111111
| QQ音乐 | `qq` | 需要設定 `qq:cookie`,見引擎文件。 ||
112112

113+
- `migu` 的 API 壞掉了。等到有更好的 API 會再更新。
114+
113115
#### 引擎文件
114116

115117
- JOOX 引擎:<https://docs.rs/unm_engine_joox>

api-utils/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ unm_engine_bilibili = { version = "0.3.0", path = "../engines/bilibili" }
1616
unm_engine_joox = { version = "0.3.0", path = "../engines/joox" }
1717
unm_engine_kugou = { version = "0.3.0", path = "../engines/kugou" }
1818
unm_engine_kuwo = { version = "0.3.0", path = "../engines/kuwo" }
19-
unm_engine_migu = { version = "0.3.0", path = "../engines/migu" }
2019
unm_engine_pyncm = { version = "0.3.0", path = "../engines/pyncm" }
2120
unm_engine_qq = { version = "0.3.0", path = "../engines/qq" }
2221
unm_engine_ytdl = { version = "0.3.0", path = "../engines/ytdl" }

api-utils/src/executor.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use unm_engine::executor::Executor;
1010

1111
/// Build an [`Executor`] with all the official engines registered.
1212
///
13-
/// Currently, it includes `bilibili`, `kugou`, `migu`, `pyncm`,
13+
/// Currently, it includes `bilibili`, `kugou`, `pyncm`,
1414
/// `ytdl`, `kuwo`, and `joox`.
1515
///
1616
/// # Example
@@ -36,7 +36,6 @@ pub fn build_full_executor() -> Executor {
3636

3737
push_engine!(bilibili: BilibiliEngine);
3838
push_engine!(kugou: KugouEngine);
39-
push_engine!(migu: MiguEngine);
4039
push_engine!(pyncm: PyNCMEngine);
4140
push_engine!(ytdl: YtDlEngine);
4241
push_engine!(kuwo: KuwoEngine);

crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ md5 = "0.7.0"
1818
once_cell = "1.16.0"
1919
openssl = { version = "0.10.42", features = ["vendored"] }
2020

21-
regex = "1.6.0"
21+
regex = "1.7.0"
2222

2323
serde = { version = "1.0.147", features = ["derive"] }
2424
serde_json = "1.0.87"

crypto/src/base64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ pub fn encode_crypto_base64(src: &[u8]) -> String {
88

99
pub fn decode_crypto_base64(src: &str) -> CryptoResult<Vec<u8>> {
1010
let src = src.replace('+', "-").replace('/', "_");
11-
Ok(decode(&src)?)
11+
Ok(decode(src)?)
1212
}

crypto/src/weapi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ mod tests {
134134
let encrypted_bytes = encrypt_with_weapi_rsa(b"a1b2c3d4", &mut buf).unwrap();
135135
assert_eq!(encrypted_bytes, 128);
136136

137-
let encrypted_base64 = base64::encode(&buf);
137+
let encrypted_base64 = base64::encode(buf);
138138
assert_eq!(
139139
encrypted_base64,
140140
r#"nknIprgQgDE2Ana3dka2qYhwE4ch/My68kTk0pGZmtkeWCTslpn9Co32as7sd5fyitf5lyXwMff/g/kDzaz6IVA/tMAtbbzkgWPDMivRy5b8z1Ypd7UV7r6aM6OgNT1bFjPo4jEAkmUl6UxCBAsrsMaaYqmW6rZl0BdJdb0/Tq0="#

engine-demo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ publish = false
1111

1212
[dependencies]
1313
futures = "0.3.25"
14-
mimalloc = "0.1.30"
14+
mimalloc = "0.1.32"
1515
tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] }
1616
unm_api_utils = { version = "0.3.0", path = "../api-utils" }
1717
unm_test_utils = { version = "0.1.0", path = "../test-utils" }

engines/joox/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ base64 = "0.13.1"
1515
http = "0.2.8"
1616
log = "0.4.17"
1717
once_cell = "1.16.0"
18-
regex = "1.6.0"
19-
reqwest = { version = "0.11.12", features = ["native-tls-vendored"] }
18+
regex = "1.7.0"
19+
reqwest = { version = "0.11.13", features = ["native-tls-vendored"] }
2020
serde_json = "1.0.87"
2121
unm_engine = { version = "0.3.0", path = "../../engine-base" }
2222
unm_request = { version = "0.3.0", path = "../../request" }

engines/kugou/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concat-string = "1.0.1"
1515
futures = "0.3.25"
1616
http = "0.2.8"
1717
log = "0.4.17"
18-
reqwest = { version = "0.11.12", features = ["native-tls-vendored"] }
18+
reqwest = { version = "0.11.13", features = ["native-tls-vendored"] }
1919
serde = { version = "1.0.147", features = ["derive"] }
2020
serde_json = "1.0.87"
2121
unm_engine = { version = "0.3.0", path = "../../engine-base" }

engines/kuwo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concat-string = "1.0.1"
1616
http = "0.2.8"
1717
log = "0.4.17"
1818
random-string = "1.0.0"
19-
reqwest = { version = "0.11.12", features = ["native-tls-vendored"] }
19+
reqwest = { version = "0.11.13", features = ["native-tls-vendored"] }
2020
serde = { version = "1.0.147", features = ["derive"] }
2121
unm_engine = { version = "0.3.0", path = "../../engine-base" }
2222
unm_request = { version = "0.3.0", path = "../../request" }

engines/migu/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ unm_types = { version = "0.3.0", path = "../../types" }
2222
url = "2.3.1"
2323

2424
[dev-dependencies]
25-
reqwest = { version = "0.11.12", features = ["native-tls-vendored"] }
25+
reqwest = { version = "0.11.13", features = ["native-tls-vendored"] }
2626
tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] }
2727
unm_test_utils = { path = "../../test-utils" }

engines/pyncm/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ unm_engine = { version = "0.3.0", path = "../../engine-base" }
1818
unm_request = { version = "0.3.0", path = "../../request" }
1919
unm_types = { version = "0.3.0", path = "../../types" }
2020
url = "2.3.1"
21+
22+
[dev-dependencies]
23+
tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] }
24+
unm_test_utils = { path = "../../test-utils" }

0 commit comments

Comments
 (0)