mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-03-11 17:45:30 +00:00
[CR] Rename crunchy play stream flag
This commit is contained in:
parent
1f8ddb27a1
commit
345aa0f267
4 changed files with 7 additions and 7 deletions
2
@types/crunchyTypes.d.ts
vendored
2
@types/crunchyTypes.d.ts
vendored
|
|
@ -7,7 +7,7 @@ import { CrunchyPlayStreams } from './enums';
|
||||||
export type CrunchyDownloadOptions = {
|
export type CrunchyDownloadOptions = {
|
||||||
hslang: string,
|
hslang: string,
|
||||||
kstream: number,
|
kstream: number,
|
||||||
cpstream: keyof typeof CrunchyPlayStreams | 'none',
|
cstream: keyof typeof CrunchyPlayStreams | 'none',
|
||||||
novids?: boolean,
|
novids?: boolean,
|
||||||
noaudio?: boolean,
|
noaudio?: boolean,
|
||||||
x: number,
|
x: number,
|
||||||
|
|
|
||||||
|
|
@ -1417,8 +1417,8 @@ export default class Crunchy implements ServiceClass {
|
||||||
|
|
||||||
|
|
||||||
let playStream: CrunchyPlayStream | null = null;
|
let playStream: CrunchyPlayStream | null = null;
|
||||||
if (options.cpstream !== 'none') {
|
if (options.cstream !== 'none') {
|
||||||
const playbackReq = await this.req.getData(`https://cr-play-service.prd.crunchyrollsvc.com/v1/${currentVersion ? currentVersion.guid : currentMediaId}/${CrunchyPlayStreams[options.cpstream]}/play`, AuthHeaders);
|
const playbackReq = await this.req.getData(`https://cr-play-service.prd.crunchyrollsvc.com/v1/${currentVersion ? currentVersion.guid : currentMediaId}/${CrunchyPlayStreams[options.cstream]}/play`, AuthHeaders);
|
||||||
if (!playbackReq.ok || !playbackReq.res) {
|
if (!playbackReq.ok || !playbackReq.res) {
|
||||||
console.error('Non-DRM Request Stream URLs FAILED!');
|
console.error('Non-DRM Request Stream URLs FAILED!');
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1435,7 +1435,7 @@ export default class Crunchy implements ServiceClass {
|
||||||
url: playStream.url,
|
url: playStream.url,
|
||||||
hardsub_locale: ''
|
hardsub_locale: ''
|
||||||
};
|
};
|
||||||
pbData.data[0][`adaptive_${options.cpstream}_${playStream.url.includes('m3u8') ? 'hls' : 'dash'}_drm`] = {
|
pbData.data[0][`adaptive_${options.cstream}_${playStream.url.includes('m3u8') ? 'hls' : 'dash'}_drm`] = {
|
||||||
...derivedPlaystreams
|
...derivedPlaystreams
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ let argvC: {
|
||||||
q: number;
|
q: number;
|
||||||
x: number;
|
x: number;
|
||||||
kstream: number;
|
kstream: number;
|
||||||
cpstream: keyof typeof CrunchyPlayStreams | 'none';
|
cstream: keyof typeof CrunchyPlayStreams | 'none';
|
||||||
partsize: number;
|
partsize: number;
|
||||||
hslang: string;
|
hslang: string;
|
||||||
dlsubs: string[];
|
dlsubs: string[];
|
||||||
|
|
|
||||||
|
|
@ -285,9 +285,9 @@ const args: TAppArg<boolean|number|string|unknown[]>[] = [
|
||||||
usage: '${stream}'
|
usage: '${stream}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cpstream',
|
name: 'cstream',
|
||||||
group: 'dl',
|
group: 'dl',
|
||||||
alias: 'cps',
|
alias: 'cs',
|
||||||
service: ['crunchy'],
|
service: ['crunchy'],
|
||||||
type: 'string',
|
type: 'string',
|
||||||
describe: 'Select specific crunchy play stream by device, or disable stream with "none"',
|
describe: 'Select specific crunchy play stream by device, or disable stream with "none"',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue