fix: minor fix

This commit is contained in:
JellyBrick
2023-09-04 17:45:25 +09:00
parent 9b6e3c850a
commit ce264c5d65
5 changed files with 16 additions and 22 deletions

View File

@ -1,15 +1,11 @@
import { ipcMain } from 'electron';
import { Innertube } from 'youtubei.js';
import config from './config';
export default async () => {
const yt = await Innertube.create();
ipcMain.handle('audio-url', async (_, videoID: string) => {
const info = await yt.getBasicInfo(videoID);
const url = info.streaming_data?.formats[0].decipher(yt.session.player);
return url;
return info.streaming_data?.formats[0].decipher(yt.session.player);
});
};