Dual-Caption-Blog
Dual-Caption-Blog copied to clipboard
[feature] Naming downloaded files as "*.ar.srt" instead of "* - Arabic.srt"
This makes no need for the user to rename the filename for the subtitle to be embedded in the video with the same name, with keeping the advantage of which this .srt
file's language.
Just edit this in watch.js
:
case "srt": await subtitlesHandler(c, t || p).then((e) => {
const t = e.reduce((e, t) => t.segs.trim() ? e.concat(`${e.length + 1}\n${d(t.tStartMs)} --\x3e ${d(t.tStartMs + t.dDurationMs)}\n${t.segs}`) : e, []).join("\n\n");
s(t, `${i}.${/* Here should be the language abbreviation like: "ar", "en" */}.srt`); // <---
}).catch(() => errorBackHandler(1));
break;