From a29807895c49dddad1fd02fc2c4c1f48dc787f19 Mon Sep 17 00:00:00 2001 From: AnimeDL Date: Fri, 12 Apr 2024 16:23:34 -0700 Subject: [PATCH] [AO] Fix bug with subtitles being overwritten --- ao.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ao.ts b/ao.ts index e62f910..370a1a8 100644 --- a/ao.ts +++ b/ao.ts @@ -395,10 +395,10 @@ export default class AnimeOnegai implements ServiceClass { const files: DownloadedMedia[] = []; + let subIndex = 0; let dlFailed = false; let dlVideoOnce = false; // Variable to save if best selected video quality was downloaded - for (const media of medias.data) { console.info(`Requesting: [E.${media.episode.ID}] ${mediaName}`); @@ -726,7 +726,6 @@ export default class AnimeOnegai implements ServiceClass { if (!options.skipsubs && options.dlsubs.indexOf('none') == -1) { if(streamData.subtitles.length > 0) { - let subIndex = 0; for(const sub of streamData.subtitles) { const subLang = langsData.languages.find(a => a.ao_locale === sub.lang); if (!subLang) {