diff --git a/findSub.js b/findSub.js index 382c51c..2c3eb43 100644 --- a/findSub.js +++ b/findSub.js @@ -32,8 +32,8 @@ export const findSub = async (subTitles) => { } } - console.log('最终选择的简体中文字幕索引为:', chsSub.index); - console.log('最终选择的英语字幕索引为:', engSub.index); + console.log(`最终选择的简体中文字幕索引为:${chsSub.index},帧:${chsSub.frames}`); + console.log(`最终选择的英语字幕索引为:${engSub.index},帧:${chsSub.frames}`); console.log('时长:', chsSub.duration); return [chsSub, engSub]; @@ -107,7 +107,8 @@ const findChiSub = (subTitles) => { return targetSub ? { index: targetSub.index, - duration: targetSub.duration + duration: targetSub.duration, + frames: targetSub.frames } : null; } @@ -130,7 +131,7 @@ const findEngSub = (subTitles) => { const nonEmpty = englishSubs.filter(sub => { const frames = Number(sub.frames); if (!frames) return true; - return frames >= 10; + return frames >= 100; }); const candidatePool = nonEmpty.length > 0 ? nonEmpty : englishSubs; @@ -146,6 +147,7 @@ const findEngSub = (subTitles) => { return targetSub ? { index: targetSub.index, - duration: targetSub.duration + duration: targetSub.duration, + frames: targetSub.frames } : null; }; diff --git a/package-lock.json b/package-lock.json index 39487d8..afe1ec1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dual-subtitle", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dual-subtitle", - "version": "0.5.0", + "version": "0.5.1", "license": "MIT", "dependencies": { "@ffmpeg-installer/ffmpeg": "^1.1.0", diff --git a/package.json b/package.json index 27d1fe3..80c2e3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dual-subtitle", - "version": "0.5.0", + "version": "0.5.1", "main": "index.js", "type": "module", "bin": {