mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-01-11 20:10:20 +00:00
Merge pull request #1028 from MikoGome/order-audio
order audio tracks based on --dubLang
This commit is contained in:
commit
cf334d0bec
1 changed files with 5 additions and 0 deletions
|
|
@ -2687,6 +2687,11 @@ export default class Crunchy implements ServiceClass {
|
|||
item.langs.push(langsData.languages.find(a => a.cr_locale == version.audio_locale) as langsData.LanguageItem);
|
||||
}
|
||||
}
|
||||
//Sort audio tracks according to the order of languages passed to the 'dubLang' option
|
||||
const argv = yargs.appArgv(this.cfg.cli);
|
||||
if(!argv.allDubs) {
|
||||
item.langs.sort((a,b) => argv.dubLang.indexOf(a.code) - argv.dubLang.indexOf(b.code));
|
||||
}
|
||||
} else {
|
||||
//Episode didn't have versions, mark it as such to be logged.
|
||||
serieshasversions = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue