mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
feat(docs): update README with playback history and instant replay features
refactor(commands): remove unused imports from various command files refactor(src): clean up imports in multiple source files for better organization (#21)
This commit is contained in:
1 parent
e33fbb2fdb
commit
5dc286e364
19 files changed
+32
-39
No files matched your search
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
import Player from "./player/index.mjs";
|
||||
import { Utils, cleanId } from "../utils/Utils.mjs";
|
||||
import { cleanId } from "../utils/Utils.mjs";
|
||||
import { logger } from "../core/Logger.mjs";
|
||||
import { getMessageGuildId } from "../ui/index.mjs";
|
||||
import { applyMixins } from "../utils/mixins.mjs";
|
||||
|
||||
@@ -163,16 +163,13 @@ export class FluxerAudioBridge extends EventEmitter {
|
||||
// this point get the explicit error below instead of fetching their
|
||||
// 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, {
|
||||
logger.player("[AudioBridge] Route 3: Fetching directly via SafeHttp: " + trackInfo.url.substring(0, 80) + "...");
|
||||
const { openPublicStream } = await import("./SafeHttp.mjs");
|
||||
const { stream, req } = await openPublicStream(trackInfo.url, {
|
||||
headers: { "User-Agent": "Mozilla/5.0 (compatible; Bot/1.0)" },
|
||||
redirect: "follow",
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error("HTTP " + response.status + " for " + trackInfo.url);
|
||||
}
|
||||
const stream = Readable.fromWeb(response.body);
|
||||
this._sourceStream = stream;
|
||||
this._sourceReq = req || null;
|
||||
|
||||
const routed = await this._routeByMagic(stream);
|
||||
if (routed.kind === "webm") {
|
||||
|
||||
@@ -9,13 +9,10 @@
|
||||
*/
|
||||
|
||||
import { EmbedBuilder } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../../ui/index.mjs";
|
||||
import { ERROR_COLOR } from "../../utils/UI.mjs";
|
||||
import { Utils, cleanId } from "../../utils/Utils.mjs";
|
||||
import { logger } from "../../core/Logger.mjs";
|
||||
import meta from "../probe.mjs";
|
||||
import { getBilibiliStreamUrl } from "../bilibili/index.mjs";
|
||||
import { isLoadstreamEnabled } from "../audio/AudioSettings.mjs";
|
||||
|
||||
/**
|
||||
* @type {object}
|
||||
|
||||
@@ -11,8 +11,7 @@ import { getVoiceManager } from "@fluxerjs/voice";
|
||||
import { EventEmitter } from "node:events";
|
||||
import http from "node:http";
|
||||
import https from "node:https";
|
||||
import { EmbedBuilder, PermissionFlags } from "@fluxerjs/core";
|
||||
import { getGlobalColor } from "../../ui/index.mjs";
|
||||
import { PermissionFlags } from "@fluxerjs/core";
|
||||
import { Utils, cleanId } from "../../utils/Utils.mjs";
|
||||
import { logger } from "../../core/Logger.mjs";
|
||||
import { get247ChannelMode, detachPlayerFromManager } from "../../utils/Helpers247.mjs";
|
||||
|
||||
Reference in new issue
Block a user