nukeop/nuclear

View on GitHub
packages/core/src/rest/Youtube.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function getStreamForId has 26 lines of code (exceeds 25 allowed). Consider refactoring.
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' });
Severity: Minor
Found in packages/core/src/rest/Youtube.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status