mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-03-11 17:45:30 +00:00
parent
4a135092e9
commit
3c840e46f0
3 changed files with 14 additions and 3 deletions
1
@types/crunchyTypes.d.ts
vendored
1
@types/crunchyTypes.d.ts
vendored
|
|
@ -17,6 +17,7 @@ export type CrunchyDownloadOptions = {
|
|||
fsRetryTime: number,
|
||||
dlsubs: string[],
|
||||
skipsubs: boolean,
|
||||
nosubs?: boolean,
|
||||
mp4: boolean,
|
||||
override: string[],
|
||||
videoTitle: string,
|
||||
|
|
|
|||
11
crunchy.ts
11
crunchy.ts
|
|
@ -865,7 +865,7 @@ export default class Crunchy implements ServiceClass {
|
|||
public async getObjectById(e?: string, earlyReturn?: boolean, external_id?: boolean): Promise<ObjectInfo|Partial<CrunchyEpMeta>[]|undefined> {
|
||||
if(!this.cmsToken.cms){
|
||||
console.error('Authentication required!');
|
||||
return;
|
||||
return [];
|
||||
}
|
||||
|
||||
let convertedObjects;
|
||||
|
|
@ -907,7 +907,7 @@ export default class Crunchy implements ServiceClass {
|
|||
|
||||
if(doEpsFilter.values.length < 1){
|
||||
console.info('\nObjects not selected!\n');
|
||||
return;
|
||||
return [];
|
||||
}
|
||||
|
||||
// node index.js --service crunchy -e G6497Z43Y,GRZXCMN1W,G62PEZ2E6,G25FVGDEK,GZ7UVPVX5
|
||||
|
|
@ -930,7 +930,7 @@ export default class Crunchy implements ServiceClass {
|
|||
objectInfo.error = true;
|
||||
return objectInfo;
|
||||
}
|
||||
return;
|
||||
return [];
|
||||
}
|
||||
|
||||
const objectInfo = JSON.parse(objectReq.res.body) as ObjectInfo;
|
||||
|
|
@ -1356,6 +1356,11 @@ export default class Crunchy implements ServiceClass {
|
|||
console.warn('Subtitles downloading disabled for hardsubs streams.');
|
||||
options.skipsubs = true;
|
||||
}
|
||||
|
||||
if (options.nosubs) {
|
||||
console.info('Subtitles downloading disabled from nosubs flag.');
|
||||
options.skipsubs = true;
|
||||
}
|
||||
|
||||
if(!options.skipsubs && options.dlsubs.indexOf('none') == -1){
|
||||
if(pbData.meta.subtitles && Object.values(pbData.meta.subtitles).length > 0){
|
||||
|
|
|
|||
|
|
@ -681,6 +681,11 @@ export default class Hidive implements ServiceClass {
|
|||
options.dlsubs = ['all'];
|
||||
}
|
||||
|
||||
if (options.nosubs) {
|
||||
console.info('Subtitles downloading disabled from nosubs flag.');
|
||||
options.skipsubs = true;
|
||||
}
|
||||
|
||||
if(!options.skipsubs && options.dlsubs.indexOf('none') == -1) {
|
||||
if(subUrls.length > 0) {
|
||||
let subIndex = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue