testing this for a day if its bad i just wast my time

This commit is contained in:
NoLogicAlan committed 2026-10-05 03:29:05 +03:00
1 parent fd58343ce9
commit 656cbfe149
33 files changed
+726 -102

No files matched your search

+5 -8
View File
@@ -2,9 +2,9 @@
import { logger } from "../../core/Logger.mjs";
import { EventEmitter } from "node:events";
import { Readable } from "node:stream";
import { applyMixins } from "../../utils/mixins.mjs";
import { isLoadstreamEnabled } from "./AudioSettings.mjs";
import { isLoadstreamEnabled, isPrivateUrlsAllowed } from "./AudioSettings.mjs";
import { openPublicStream } from "./SafeHttp.mjs";
import StreamPipeline from "./StreamPipeline.mjs";
import HttpStreams from "./HttpStreams.mjs";
@@ -168,15 +168,12 @@ export class FluxerAudioBridge extends EventEmitter {
// source page.
if (!trackInfo.encoded && trackInfo.url && trackInfo.url.startsWith("http")) {
logger.player("[AudioBridge] Route 3: Fetching directly: " + trackInfo.url.substring(0, 80) + "...");
const response = await fetch(trackInfo.url, {
const { stream, req: sourceReq } = await openPublicStream(trackInfo.url, {
headers: { "User-Agent": "Mozilla/5.0 (compatible; Bot/1.0)" },
redirect: "follow",
allowPrivate: trackInfo.trusted === true || isPrivateUrlsAllowed(),
});
if (!response.ok) {
throw new Error("HTTP " + response.status + " for " + trackInfo.url);
}
const stream = Readable.fromWeb(response.body);
this._sourceStream = stream;
this._sourceReq = sourceReq;
const routed = await this._routeByMagic(stream);
if (routed.kind === "webm") {