4.5.1 #595

Merged
AnimeDL merged 73 commits from mpd-support into master 2024-03-18 02:08:39 +00:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 169d48aa47 - Show all commits

View file

@ -31,6 +31,7 @@ export type CrunchyDownloadOptions = {
dlVideoOnce: boolean,
skipmux?: boolean,
syncTiming: boolean,
nocleanup: boolean,
apiType: 'web' | 'android'
}

View file

@ -1583,7 +1583,9 @@ export default class Crunchy implements ServiceClass {
return undefined;
} else {
console.info('Decryption done for video');
fs.removeSync(`${tsFile}.video.enc.ts`);
if (!options.nocleanup) {
fs.removeSync(`${tsFile}.video.enc.ts`);
}
files.push({
type: 'Video',
path: `${tsFile}.video.ts`,
@ -1601,7 +1603,9 @@ export default class Crunchy implements ServiceClass {
console.error(`Decryption failed with exit code ${decryptAudio.err.code}`);
return undefined;
} else {
fs.removeSync(`${tsFile}.audio.enc.ts`);
if (!options.nocleanup) {
fs.removeSync(`${tsFile}.audio.enc.ts`);
}
files.push({
type: 'Audio',
path: `${tsFile}.audio.ts`,