packages/core/src/rest/Youtube.ts
Function getStreamForId
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getStreamForId = async (id: string, sourceName: string, useSponsorBlock = true): Promise<StreamData> => {
try {
const videoUrl = baseUrl + id;
const trackInfo = await ytdl.getInfo(videoUrl);
const formatInfo = ytdl.chooseFormat(trackInfo.formats, { quality: 'highestaudio' });