Fix WV relative pathing

This commit is contained in:
AnimeDL 2023-12-25 11:11:55 -08:00
parent ee38658d0d
commit 942f673934

View file

@ -2,10 +2,12 @@ import { KeyContainer, Session } from './license';
import fs from 'fs';
import { console } from './log';
import got from 'got';
import { workingDir } from './module.cfg-loader';
import path from 'path';
//read cdm files located in the same directory
const privateKey = fs.readFileSync('./widevine/device_private_key');
const identifierBlob = fs.readFileSync('./widevine/device_client_id_blob');
const privateKey = fs.readFileSync(path.join(workingDir, 'widevine', 'device_private_key'));
const identifierBlob = fs.readFileSync(path.join(workingDir, 'widevine', 'device_client_id_blob'));
export default async function getKeys(pssh: string | undefined, licenseServer: string, authData: Record<string, string>): Promise<KeyContainer[]> {
if (!pssh) return [];