revert hidive fallback logic.

Again a core change to how all other services work just for hidive doesn't seem like the right course of action.
This commit is contained in:
Sipherdrakon 2025-08-31 19:33:47 -04:00 committed by GitHub
parent 2b30c8e458
commit 03ab5007d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -760,19 +760,8 @@ export default class Hidive implements ServiceClass {
}
}
if (chosenAudios.length == 0) {
console.warn(`Chosen audio language(s) does not exist for episode ${selectedEpisode.episodeInformation.episodeNumber}, falling back to first available audio`);
if (audios.length > 0) {
let chosenAudioQuality = options.q === 0 ? audios.length : options.q;
if(chosenAudioQuality > audios.length) {
chosenAudioQuality = audios.length;
}
chosenAudioQuality--;
chosenAudios.push(audios[chosenAudioQuality]);
console.info(`Using audio track: ${audios[chosenAudioQuality].language.code || 'unknown'}`);
} else {
console.error(`No audio tracks available for episode ${selectedEpisode.episodeInformation.episodeNumber}`);
return undefined;
}
console.error(`Chosen audio language(s) does not exist for episode ${selectedEpisode.episodeInformation.episodeNumber}`);
return undefined;
}
const fileName = parseFileName(options.fileName, variables, options.numbers, options.override).join(path.sep);