diff --git a/src/modules/processing/match.js b/src/modules/processing/match.js index 428c3fa7..4e06c533 100644 --- a/src/modules/processing/match.js +++ b/src/modules/processing/match.js @@ -18,45 +18,6 @@ import soundcloud from "./services/soundcloud.js"; import instagram from "./services/instagram.js"; import vine from "./services/vine.js"; -export class YouTubeFetchInfo { - /** - * ID of the YouTube video. - * - * @type {string} - */ - id - /** - * Quality of the YouTube video. - * - * @type {string} - */ - quality - /** - * Format of the YouTube video to be downloaded. - * - * @type {string} - */ - format - /** - * Whether only the audio of the YouTube video should be gotten. - * - * @type {boolean} - */ - isAudioOnly - /** - * Whether audio of the YouTube video should be muted. - * - * @type {boolean} - */ - isAudioMuted - /** - * Dub language to use for the video. - * - * @type {boolean | string} - */ - dubLang -} - /** * @param {PostInfo} obj Post information */ @@ -88,7 +49,6 @@ export default async function (host, patternMatch, url, lang, obj) { }); break; case "youtube": - /** @type {YouTubeFetchInfo} */ let fetchInfo = { id: patternMatch["id"].slice(0, 11), quality: obj.vQuality, diff --git a/src/modules/processing/services/youtube.js b/src/modules/processing/services/youtube.js index af826617..54b11277 100644 --- a/src/modules/processing/services/youtube.js +++ b/src/modules/processing/services/youtube.js @@ -1,6 +1,5 @@ import { Innertube } from 'youtubei.js'; import { maxVideoDuration } from '../../config.js'; -import { YouTubeFetchInfo } from '../match.js'; const yt = await Innertube.create(); @@ -22,6 +21,45 @@ const c = { } } +export class YouTubeFetchInfo { + /** + * ID of the YouTube video. + * + * @type {string} + */ + id + /** + * Quality of the YouTube video. + * + * @type {string} + */ + quality + /** + * Format of the YouTube video to be downloaded. + * + * @type {string} + */ + format + /** + * Whether only the audio of the YouTube video should be gotten. + * + * @type {boolean} + */ + isAudioOnly + /** + * Whether audio of the YouTube video should be muted. + * + * @type {boolean} + */ + isAudioMuted + /** + * Dub language to use for the video. + * + * @type {boolean | string} + */ + dubLang +} + /** * Creates a filename to be downloaded for the requested YouTube video. *