From 7128d15ad22778031abe16b633f643bdd4c40ab0 Mon Sep 17 00:00:00 2001 From: localhost Date: Fri, 14 Mar 2025 22:28:58 +0100 Subject: [PATCH] go back --- index.js | 10 +--------- package.json | 4 +--- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 8241fba..833e736 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,4 @@ -require('dotenv').config() const express = require('express') -const { randomDispatcher } = require('freebind'); const { Innertube, Utils } = require('@preservetube/youtube.js'); const hr = require('@tsmx/human-readable') @@ -9,7 +7,6 @@ const ffmpegStatic = require('ffmpeg-static') const fs = require('node:fs') const app = express() -const dispatcher = randomDispatcher(process.env.RANGE) require('express-ws')(app) ffmpeg.setFfmpegPath(ffmpegStatic) @@ -124,12 +121,7 @@ app.get('/videos/:id', async (req, res) => { }) app.ws('/download/:id/:quality', async (ws, req) => { - const yt = await Innertube.create({ - fetch: (input, init) => fetch(input, { - ...init, - dispatcher: dispatcher - }) - }); + const yt = await Innertube.create(); const info = await yt.getInfo(req.params.id, 'ANDROID'); if (info.playability_status.status !== 'OK') { ws.send(`This video is not available for download (${info.playability_status.status} ${info.playability_status.reason}).`); diff --git a/package.json b/package.json index 2e675b7..b89f507 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,9 @@ "dependencies": { "@preservetube/youtube.js": "^13.1.0", "@tsmx/human-readable": "^2.0.3", - "dotenv": "^16.4.7", "express": "^4.21.1", "express-ws": "^5.0.2", "ffmpeg-static": "^5.2.0", - "fluent-ffmpeg": "^2.1.3", - "freebind": "^0.2.2" + "fluent-ffmpeg": "^2.1.3" } }