hotfix(better)

This commit is contained in:
NoLogicAlan committed 2026-09-19 03:32:48 +03:00
1 parent 2658402c39
commit 3ea34c7f19
7 files changed
+905 -99

No files matched your search

+12 -1
View File
@@ -14,6 +14,7 @@ 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}
@@ -477,7 +478,9 @@ const PlaybackMixin = {
/**
* @async Apply an audio filter to playback. Stores filter metadata for
* dashboard tracking; filters are applied server-side by NodeLink on the
* next track.
* next track. Requires the loadstream route (config.json ->
* audio.allowLoadstream) — NodeLink server-side effects cannot run when the
* bot is in trackstream-only mode, so activation is rejected with a reason.
* @this {import('./Player.mjs').Player}
* @param {object} filterPayload
* @param {object|null} [filterMeta=null]
@@ -488,6 +491,14 @@ const PlaybackMixin = {
return { ok: false, reason: "Player not bound to a guild." };
}
if (filterMeta && !isLoadstreamEnabled()) {
logger.warn("[Player] applyFilter rejected — loadstream route disabled (audio.allowLoadstream), filters are NodeLink server-side effects");
return {
ok: false,
reason: "filters need the NodeLink loadstream route — set audio.allowLoadstream to true in config.json; playback is unfiltered in trackstream mode",
};
}
const current = this.queue.getCurrent();
this.activeFilter = filterMeta ?? null;