mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 11:56:23 +08:00
daemon 子进程现会透传下载并发配置,下载进度按已完成数量单调上报。MediaCatalog 改为使用官方相对路径生成全局媒体 URL,覆盖 GameData、Prologue 等目录并补齐 jpg 资源,避免叶子文件名误拼媒体根目录导致 403。同步更新测试、smoke 断言和运行文档。
This commit is contained in:
@@ -646,8 +646,8 @@ impl YostarJpResourceRoot {
|
||||
|
||||
/// Returns an official media archive URL.
|
||||
///
|
||||
/// The argument is the `Media.FileName` field from `MediaCatalog.bytes`,
|
||||
/// for example `JP_Airi.zip`.
|
||||
/// The argument is the downloadable relative path from `MediaCatalog.bytes`,
|
||||
/// for example `GameData/Audio/VOC_JP/JP_Airi.zip`.
|
||||
pub fn media_file(&self, platform: PatchPlatform, file_name: &str) -> Result<String, String> {
|
||||
validate_relative_path(file_name, "media file")?;
|
||||
Ok(format!(
|
||||
@@ -1134,8 +1134,9 @@ mod tests {
|
||||
"https://prod-clientpatch.bluearchiveyostar.com/r93_dctuo3tcd029wwxnvb55/MediaResources-Windows/Catalog/MediaCatalog.bytes"
|
||||
);
|
||||
assert_eq!(
|
||||
root.media_file(PatchPlatform::Windows, "JP_Airi.zip").unwrap(),
|
||||
"https://prod-clientpatch.bluearchiveyostar.com/r93_dctuo3tcd029wwxnvb55/MediaResources-Windows/JP_Airi.zip"
|
||||
root.media_file(PatchPlatform::Windows, "GameData/Audio/VOC_JP/JP_Airi.zip")
|
||||
.unwrap(),
|
||||
"https://prod-clientpatch.bluearchiveyostar.com/r93_dctuo3tcd029wwxnvb55/MediaResources-Windows/GameData/Audio/VOC_JP/JP_Airi.zip"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1211,7 +1212,7 @@ mod tests {
|
||||
);
|
||||
assert!(root.table_bundle("text=jp/ExcelDB.db").is_err());
|
||||
assert!(root
|
||||
.media_file(PatchPlatform::Windows, "/JP_Airi.zip")
|
||||
.media_file(PatchPlatform::Windows, "/GameData/Audio/VOC_JP/JP_Airi.zip")
|
||||
.is_err());
|
||||
assert!(root
|
||||
.bundle_patch_pack(PatchPlatform::Windows, "../FullPatch_000.zip")
|
||||
|
||||
Reference in New Issue
Block a user