Fixed japanese audio being labeled incorrectly
This commit is contained in:
parent
42bf60db2c
commit
79048ff534
4 changed files with 24 additions and 23 deletions
2
funi.js
2
funi.js
|
|
@ -335,7 +335,7 @@ async function getEpisode(fnSlug){
|
|||
'esLA': 'Spanish (Latin Am)',
|
||||
'ptBR': 'Portuguese (Brazil)',
|
||||
'zhMN': 'Chinese (Mandarin, PRC)',
|
||||
'jpJP': 'Japanese'
|
||||
'jaJP': 'Japanese'
|
||||
};
|
||||
|
||||
// select
|
||||
|
|
|
|||
|
|
@ -82,25 +82,6 @@ const buildCommandMkvMerge = (videoAndAudio, onlyVid, onlyAudio, subtitles, outp
|
|||
'--engage no_variable_data',
|
||||
);
|
||||
|
||||
for (let vid of videoAndAudio) {
|
||||
if (!hasVideo) {
|
||||
args.push(
|
||||
'--video-tracks 0',
|
||||
'--audio-tracks 1'
|
||||
)
|
||||
args.push(`--track-name 0:[Funimation]`)
|
||||
args.push(`--language 1:${getLanguageCode(vid.lang, argv.todo ? 'jpn' : 'eng')}`);
|
||||
hasVideo = true
|
||||
} else {
|
||||
args.push(
|
||||
'--no-video',
|
||||
'--audio-tracks 1'
|
||||
)
|
||||
args.push(`--language 1:${getLanguageCode(vid.lang, argv.todo ? 'jpn' : 'eng')}`);
|
||||
}
|
||||
args.push(`"${vid.path}"`)
|
||||
}
|
||||
|
||||
for (let vid of onlyVid) {
|
||||
if (!hasVideo) {
|
||||
args.push(
|
||||
|
|
@ -113,8 +94,28 @@ const buildCommandMkvMerge = (videoAndAudio, onlyVid, onlyAudio, subtitles, outp
|
|||
}
|
||||
}
|
||||
|
||||
for (let vid of videoAndAudio) {
|
||||
console.log(vid, vid.lang)
|
||||
if (!hasVideo) {
|
||||
args.push(
|
||||
'--video-tracks 0',
|
||||
'--audio-tracks 1'
|
||||
)
|
||||
args.push(`--track-name 0:[Funimation]`)
|
||||
args.push(`--language 1:${getLanguageCode(vid.lang, vid.lang)}`);
|
||||
hasVideo = true
|
||||
} else {
|
||||
args.push(
|
||||
'--no-video',
|
||||
'--audio-tracks 1'
|
||||
)
|
||||
args.push(`--language 1:${getLanguageCode(vid.lang, vid.lang)}`);
|
||||
}
|
||||
args.push(`"${vid.path}"`)
|
||||
}
|
||||
|
||||
for (let aud of onlyAudio) {
|
||||
args.push(`--language 0:${getLanguageCode(aud.lang, argv.todo ? 'jpn' : 'eng')}`);
|
||||
args.push(`--language 0:${getLanguageCode(aud.lang, aud.lang)}`);
|
||||
args.push(
|
||||
'--no-video',
|
||||
'--audio-tracks 0'
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ const appArgv = (cfg) => {
|
|||
.option('dub', {
|
||||
group: 'Downloading:',
|
||||
describe: 'Download non-Japanese Dub (English Dub mode by default)',
|
||||
choices: [ 'enUS', 'esLA', 'ptBR', 'zhMN', 'jpJP' ],
|
||||
choices: [ 'enUS', 'esLA', 'ptBR', 'zhMN', 'jaJP' ],
|
||||
default: cfg.dub || 'enUS',
|
||||
type: 'array',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "funimation-downloader-nx",
|
||||
"short_name": "funi",
|
||||
"version": "4.9.0",
|
||||
"version": "4.9.1",
|
||||
"description": "Download videos from Funimation via cli.",
|
||||
"keywords": [
|
||||
"download",
|
||||
|
|
|
|||
Loading…
Reference in a new issue