fix(m3u8): invalid m3u8-parser import

This commit is contained in:
stratumadev 2025-11-27 22:32:52 +01:00
parent cd530295a8
commit 045a439b82
2 changed files with 6 additions and 6 deletions

6
adn.ts
View file

@ -7,7 +7,7 @@ import fs from 'fs';
import crypto from 'crypto';
// Plugins
import m3u8 from 'm3u8-parser';
import { Parser } from 'm3u8-parser';
// Modules
import * as fontsData from './modules/module.fontsData';
@ -602,7 +602,7 @@ export default class AnimationDigitalNetwork implements ServiceClass {
const streamPlaylistBody = await streamPlaylistsReq.res.text();
// Init parser
const parser = new m3u8.Parser();
const parser = new Parser();
// Parse M3U8
parser.push(streamPlaylistBody);
@ -724,7 +724,7 @@ export default class AnimationDigitalNetwork implements ServiceClass {
const chunkPageBody = await chunkPage.res.text();
// Init parser
const parser = new m3u8.Parser();
const parser = new Parser();
// Parse M3U8
parser.push(chunkPageBody);

View file

@ -9,7 +9,7 @@ import packageJson from './package.json';
import { console } from './modules/log';
import streamdl, { M3U8Json } from './modules/hls-download';
import Helper from './modules/module.helper';
import m3u8 from 'm3u8-parser';
import { Parser } from 'm3u8-parser';
// custom modules
import * as fontsData from './modules/module.fontsData';
@ -2508,7 +2508,7 @@ export default class Crunchy implements ServiceClass {
}
} else if (!options.novids) {
// Init parser
const parser = new m3u8.Parser();
const parser = new Parser();
// Parse M3U8
parser.push(vstreamPlaylistBody);
@ -2650,7 +2650,7 @@ export default class Crunchy implements ServiceClass {
const chunkPageBody = await chunkPage.res.text();
// Init parser
const parser = new m3u8.Parser();
const parser = new Parser();
// Parse M3U8
parser.push(chunkPageBody);