MusicControls: Set Websocket URL
This commit is contained in:
parent
f2895288e7
commit
401a12a539
2 changed files with 9 additions and 1 deletions
|
|
@ -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,
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue