From 1d00b42b0b056ab794a97c66f404c5355782f466 Mon Sep 17 00:00:00 2001 From: acc029 <20601421+acc029@users.noreply.github.com> Date: Thu, 21 Jul 2022 14:36:25 -0300 Subject: [PATCH 1/2] Separate Latin American Spanish and European Spanish codes with region/territory tags --- docs/DOCUMENTATION.md | 4 ++-- modules/module.langsData.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/DOCUMENTATION.md b/docs/DOCUMENTATION.md index 789a652..6f61c52 100644 --- a/docs/DOCUMENTATION.md +++ b/docs/DOCUMENTATION.md @@ -167,11 +167,11 @@ Skip downloading subtitles #### `--dubLang` | **Service** | **Usage** | **Type** | **Required** | **Alias** | **Choices** | **Default** |**cli-default Entry** | --- | --- | --- | --- | --- | --- | --- | ---| -| Both | `--dubLang ${dub1} ${dub2}` | `array` | `No`| `NaN` | [`eng`, `spa`, `por`, `fra`, `deu`, `ara`, `ita`, `rus`, `tur`, `hin`, `cmn`, `zho`, `kor`, `jpn`] | `jpn`| `dubLang: ` | +| Both | `--dubLang ${dub1} ${dub2}` | `array` | `No`| `NaN` | [`eng`, `spa-419`, `spa-ES`, `por`, `fra`, `deu`, `ara`, `ita`, `rus`, `tur`, `hin`, `cmn`, `zho`, `kor`, `jpn`] | `jpn`| `dubLang: ` | Set the language to download: Funi Only: cmn -Crunchy Only: spa, spa, fra, deu, ara, ara, ita, rus, tur, hin, zho, kor +Crunchy Only: spa-419, spa-ES, fra, deu, ara, ara, ita, rus, tur, hin, zho, kor #### `--all` | **Service** | **Usage** | **Type** | **Required** | **Alias** | **Default** |**cli-default Entry** | --- | --- | --- | --- | --- | --- | ---| diff --git a/modules/module.langsData.ts b/modules/module.langsData.ts index ea8537f..448d09c 100644 --- a/modules/module.langsData.ts +++ b/modules/module.langsData.ts @@ -13,9 +13,9 @@ export type LanguageItem = { const languages: LanguageItem[] = [ { cr_locale: 'en-US', funi_locale: 'enUS', locale: 'en', code: 'eng', name: 'English' }, - { cr_locale: 'es-LA', funi_name: 'Spanish (LAS)', funi_name_lagacy: 'Spanish (Latin Am)', funi_locale: 'esLA', locale: 'es-419', code: 'spa', name: 'Spanish', language: 'Latin American Spanish' }, - { cr_locale: 'es-419', locale: 'es-419', code: 'spa', name: 'Spanish', language: 'Latin American Spanish' }, - { cr_locale: 'es-ES', locale: 'es-ES', code: 'spa', name: 'Castilian', language: 'European Spanish' }, + { cr_locale: 'es-LA', funi_name: 'Spanish (LAS)', funi_name_lagacy: 'Spanish (Latin Am)', funi_locale: 'esLA', locale: 'es-419', code: 'spa-419', name: 'Spanish', language: 'Latin American Spanish' }, + { cr_locale: 'es-419', locale: 'es-419', code: 'spa-419', name: 'Spanish', language: 'Latin American Spanish' }, + { cr_locale: 'es-ES', locale: 'es-ES', code: 'spa-ES', name: 'Castilian', language: 'European Spanish' }, { cr_locale: 'pt-BR', funi_name: 'Portuguese (Brazil)', funi_locale: 'ptBR', locale: 'pt', code: 'por', name: 'Portuguese', language: 'Brazilian Portuguese' }, { cr_locale: 'pt-BR', funi_name: 'Portuguese (Brazil)', funi_locale: 'ptBR', locale: 'pt-BR', code: 'por', name: 'Portuguese', language: 'Brazilian Portuguese' }, { cr_locale: 'fr-FR', locale: 'fr', code: 'fra', name: 'French' }, -- 2.45.2 From 28d1b835e319326c7dc4b90963e50002bf5990a1 Mon Sep 17 00:00:00 2001 From: Izuco Date: Sat, 23 Jul 2022 21:24:24 +0200 Subject: [PATCH 2/2] Fix eslint errors --- modules/module.merger.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/module.merger.ts b/modules/module.merger.ts index 5b7ee29..ae0121c 100644 --- a/modules/module.merger.ts +++ b/modules/module.merger.ts @@ -171,7 +171,7 @@ class Merger { if (this.options.defaults.audio.code === vid.lang.code) { args.push('--default-track 1'); } else { - args.push('--default-track 1:0') + args.push('--default-track 1:0'); } hasVideo = true; } else { @@ -180,9 +180,9 @@ class Merger { '--audio-tracks 1' ); if (this.options.defaults.audio.code === vid.lang.code) { - args.push(`--default-track 1`) + args.push('--default-track 1'); } else { - args.push('--default-track 1:0') + args.push('--default-track 1:0'); } args.push('--track-name', `1:"${vid.lang.name}"`); args.push(`--language 1:${vid.lang.code}`); @@ -201,7 +201,7 @@ class Merger { if (this.options.defaults.audio.code === aud.lang.code) { args.push('--default-track 0'); } else { - args.push('--default-track 0:0') + args.push('--default-track 0:0'); } args.push(`"${aud.path}"`); } @@ -213,7 +213,7 @@ class Merger { if (this.options.defaults.sub.code === subObj.language.code) { args.push('--default-track 0'); } else { - args.push('--default-track 0:0') + args.push('--default-track 0:0'); } args.push(`"${subObj.file}"`); } -- 2.45.2