Dual-Caption-Blog icon indicating copy to clipboard operation
Dual-Caption-Blog copied to clipboard

[feature] Naming downloaded files as "*.ar.srt" instead of "* - Arabic.srt"

Open khateeboveskey opened this issue 1 year ago • 0 comments

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;

khateeboveskey avatar Feb 21 '24 19:02 khateeboveskey