MusicControls: Set Websocket URL

This commit is contained in:
thororen1234 2026-03-31 10:19:08 -04:00
parent f2895288e7
commit 401a12a539
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View file

@ -221,4 +221,10 @@ export const settings = definePluginSettings({
type: OptionType.BOOLEAN,
default: false,
},
WebsocketURL: {
type: OptionType.STRING,
description: "Default is ws://localhost:24123",
default: "ws://localhost:24123",
restartNeeded: true,
}
});

View file

@ -8,6 +8,8 @@ import { Logger } from "@utils/Logger";
import { proxyLazyWebpack } from "@webpack";
import { Flux, FluxDispatcher } from "@webpack/common";
import { settings } from "../settings";
export interface Track {
id: string;
name: string;
@ -91,7 +93,7 @@ class TidalSocket {
}
private initWs() {
const url = "ws://localhost:24123";
const url = settings.store.tidalWebSocketURL || "ws://localhost:24123";
if (!url) {
return;
}