Skip to content

Commit

Permalink
fix(timedtext): delete para.s
Browse files Browse the repository at this point in the history
Update Translate.response.dev.js
Update Translate.response.js
Update Composite.mjs
Update CHANGELOG.md
Update package.json
Update package-lock.json
  • Loading branch information
VirgilClyne committed Nov 5, 2024
1 parent 87284ca commit c9f6083
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 🛠️ Bug Fixes
* 修复 `YouTube``timedText` 格式`自动生成 (asr)字幕``翻译字幕`生成错误

### 🔣 Dependencies
* 分离`翻译器`脚本中的 `YouTube``Spotify``protobuf`
* 分离`外部歌词`脚本中的 `YouTube``Spotify``protobuf`
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dualsubs/universal",
"version": "1.6.0",
"version": "1.6.2",
"organizationName": "🍿️ DualSubs",
"displayName": "🍿️ DualSubs: 🔣 Universal",
"description": "流媒体平台字幕增强及双语模块\n如需恢复TV完整支持\n请配合“ iRingo: 📺 TV”使用",
Expand Down Expand Up @@ -38,7 +38,7 @@
"iOS >= 15"
],
"devDependencies": {
"@iringo/arguments-builder": "^1.8.1",
"@iringo/arguments-builder": "^1.8.2",
"@nsnanocat/util": "^1.3.2",
"@protobuf-ts/plugin": "^2.9.4",
"@protobuf-ts/runtime": "^2.9.4",
Expand Down
3 changes: 2 additions & 1 deletion src/Translate.response.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
if (para?.s) {
if (Array.isArray(para.s)) para["#"] = para.s.map(seg => seg["#"]).join(" ");
else para["#"] = para.s?.["#"] ?? "";
para.s = undefined;
// biome-ignore lint/performance/noDelete: <explanation>
delete para.s;
}
const span = para?.span ?? para;
const sentences = Array.isArray(span) ? span?.map(span => span?.["#"] ?? "\u200b").join(breakLine) : span?.["#"];
Expand Down
3 changes: 2 additions & 1 deletion src/Translate.response.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
if (para?.s) {
if (Array.isArray(para.s)) para["#"] = para.s.map(seg => seg["#"]).join(" ");
else para["#"] = para.s?.["#"] ?? "";
para.s = undefined;
// biome-ignore lint/performance/noDelete: <explanation>
delete para.s;
}
const span = para?.span ?? para;
const sentences = Array.isArray(span) ? span?.map(span => span?.["#"] ?? "\u200b").join(breakLine) : span?.["#"];
Expand Down
2 changes: 2 additions & 0 deletions src/class/Composite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default class Composite {
if (para?.s) {
if (Array.isArray(para?.s)) para["#"] = para?.s.map(seg => seg["#"]).join("");
else para["#"] = para.s?.["#"] ?? "";
// biome-ignore lint/performance/noDelete: <explanation>
delete para.s;
};
return para;
Expand All @@ -112,6 +113,7 @@ export default class Composite {
if (para?.s) {
if (Array.isArray(para?.s)) para["#"] = para?.s.map(seg => seg["#"]).join("");
else para["#"] = para.s?.["#"] ?? "";
// biome-ignore lint/performance/noDelete: <explanation>
delete para.s;
};
return para;
Expand Down

0 comments on commit c9f6083

Please sign in to comment.