1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-02-04 15:22:23 +05:30

feat: added support for embedding auto-generated subtitles #10

This commit is contained in:
2026-01-04 20:42:29 +05:30
Verified
parent da806b21e9
commit 01f4e96101
6 changed files with 29 additions and 9 deletions

View File

@@ -103,7 +103,11 @@ export default function useDownloader() {
try {
const args = [url, '--dump-single-json', '--no-warnings'];
if (formatId) args.push('--format', formatId);
if (selectedSubtitles) args.push('--embed-subs', '--sub-lang', selectedSubtitles);
if (selectedSubtitles) {
const isAutoSub = selectedSubtitles.split(',').some(lang => lang.endsWith('-orig'));
if (isAutoSub) args.push('--write-auto-sub');
args.push('--embed-subs', '--sub-lang', selectedSubtitles);
}
if (playlistIndex) args.push('--playlist-items', playlistIndex);
if (PREFER_VIDEO_OVER_PLAYLIST && !playlistIndex) args.push('--no-playlist');
if (STRICT_DOWNLOADABILITY_CHECK && !formatId) args.push('--check-all-formats');
@@ -298,6 +302,8 @@ export default function useDownloader() {
}
if (selectedSubtitles) {
const isAutoSub = selectedSubtitles.split(',').some(lang => lang.endsWith('-orig'));
if (isAutoSub) args.push('--write-auto-sub');
args.push('--embed-subs', '--sub-lang', selectedSubtitles);
}