mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-21 07:22:15 +00:00
added parsing of m3u8 file down to a list of links
This commit is contained in:
@@ -179,6 +179,13 @@ export function checkOutDir(directory: string): boolean {
|
||||
}
|
||||
|
||||
|
||||
export async function getUrlsFromPlaylist(playlistUrl: string, session: Session): Promise<Array<string>> {
|
||||
return await ApiClient.getInstance(session).callUrl(playlistUrl, 'get', null, 'text')
|
||||
.then(res => (res?.data as string).split(/\r?\n/)
|
||||
.filter(line => !(line.startsWith('#') || line === '')));
|
||||
}
|
||||
|
||||
|
||||
export function checkRequirements(): void {
|
||||
try {
|
||||
const ffmpegVer: string = execSync('ffmpeg -version').toString().split('\n')[0];
|
||||
|
||||
Reference in New Issue
Block a user