[CR] Fix issue with multi-dub downloads with non-DRM

Fix issue with non-DRM multi-dub downloads, where it would crash trying to delete a file that wasn't downloaded
This commit is contained in:
AnimeDL 2024-04-04 10:23:35 -07:00
parent 7d5e8fa461
commit 2b65f3067e

View file

@ -1803,18 +1803,22 @@ export default class Crunchy implements ServiceClass {
console.warn('mp4decrypt not found, files need decryption. Decryption Keys:', encryptionKeys);
}
} else {
files.push({
type: 'Video',
path: `${tsFile}.video.enc.ts`,
lang: lang,
isPrimary: isPrimary
});
files.push({
type: 'Audio',
path: `${tsFile}.audio.enc.ts`,
lang: lang,
isPrimary: isPrimary
});
if (videoDownloaded) {
files.push({
type: 'Video',
path: `${tsFile}.video.enc.ts`,
lang: lang,
isPrimary: isPrimary
});
}
if (audioDownloaded) {
files.push({
type: 'Audio',
path: `${tsFile}.audio.enc.ts`,
lang: lang,
isPrimary: isPrimary
});
}
}
} else if (!options.novids) {
const streamPlaylists = m3u8(streamPlaylistsReq.res.body);