Separate Latin American Spanish and European Spanish codes with region/territory tags #349

Merged
acc029 merged 3 commits from master into master 2022-07-23 19:30:06 +00:00
3 changed files with 10 additions and 10 deletions

View file

@ -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**
| --- | --- | --- | --- | --- | --- | ---|

View file

@ -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' },

View file

@ -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}"`);
}