mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-03-11 17:45:30 +00:00
make --nocleanup work for encrypted files
This commit is contained in:
parent
1b5dfa0f3e
commit
169d48aa47
2 changed files with 7 additions and 2 deletions
1
@types/crunchyTypes.d.ts
vendored
1
@types/crunchyTypes.d.ts
vendored
|
|
@ -31,6 +31,7 @@ export type CrunchyDownloadOptions = {
|
|||
dlVideoOnce: boolean,
|
||||
skipmux?: boolean,
|
||||
syncTiming: boolean,
|
||||
nocleanup: boolean,
|
||||
apiType: 'web' | 'android'
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue