mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-01-11 20:10:20 +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 = {
|
||||
hslang: string,
|
||||
kstream: number,
|
||||
cpstream: keyof typeof CrunchyPlayStreams | 'none',
|
||||
cstream: keyof typeof CrunchyPlayStreams | 'none',
|
||||
novids?: boolean,
|
||||
noaudio?: boolean,
|
||||
x: number,
|
||||
|
|
|
|||
|
|
@ -1417,8 +1417,8 @@ export default class Crunchy implements ServiceClass {
|
|||
|
||||
|
||||
let playStream: CrunchyPlayStream | null = null;
|
||||
if (options.cpstream !== 'none') {
|
||||
const playbackReq = await this.req.getData(`https://cr-play-service.prd.crunchyrollsvc.com/v1/${currentVersion ? currentVersion.guid : currentMediaId}/${CrunchyPlayStreams[options.cpstream]}/play`, AuthHeaders);
|
||||
if (options.cstream !== 'none') {
|
||||
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) {
|
||||
console.error('Non-DRM Request Stream URLs FAILED!');
|
||||
} else {
|
||||
|
|
@ -1435,7 +1435,7 @@ export default class Crunchy implements ServiceClass {
|
|||
url: playStream.url,
|
||||
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
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ let argvC: {
|
|||
q: number;
|
||||
x: number;
|
||||
kstream: number;
|
||||
cpstream: keyof typeof CrunchyPlayStreams | 'none';
|
||||
cstream: keyof typeof CrunchyPlayStreams | 'none';
|
||||
partsize: number;
|
||||
hslang: string;
|
||||
dlsubs: string[];
|
||||
|
|
|
|||
|
|
@ -285,9 +285,9 @@ const args: TAppArg<boolean|number|string|unknown[]>[] = [
|
|||
usage: '${stream}'
|
||||
},
|
||||
{
|
||||
name: 'cpstream',
|
||||
name: 'cstream',
|
||||
group: 'dl',
|
||||
alias: 'cps',
|
||||
alias: 'cs',
|
||||
service: ['crunchy'],
|
||||
type: 'string',
|
||||
describe: 'Select specific crunchy play stream by device, or disable stream with "none"',
|
||||
|
|
|
|||
Loading…
Reference in a new issue