mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Added setting for 'address' and 'port'
This commit is contained in:
@@ -22,6 +22,9 @@ const mainContainer = document.getElementById('main-container');
|
||||
// OPTIONS //
|
||||
/////////////
|
||||
|
||||
const smtcBridgeAddress = urlParams.get('smtcBridgeAddress') || '127.0.0.1';
|
||||
const smtcBridgePort = urlParams.get('smtcBridgePort') || '5000';
|
||||
|
||||
const theme = urlParams.get('theme') || 'standard';
|
||||
const font = urlParams.get("font") || "";
|
||||
const fontSize = GetIntParam("fontSize", 20);
|
||||
@@ -147,7 +150,7 @@ LoadTheme();
|
||||
|
||||
async function FetchMedia() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:5000/now-playing');
|
||||
const response = await fetch(`http://${smtcBridgeAddress}:${smtcBridgePort}/now-playing`);
|
||||
const data = await response.json();
|
||||
|
||||
// Remove the SMTC Bridge popup if it's on screen
|
||||
|
||||
@@ -221,6 +221,22 @@
|
||||
],
|
||||
"defaultValue": "slide-out-bottom",
|
||||
"group": "General"
|
||||
},
|
||||
{
|
||||
"id": "smtcBridgeAddress",
|
||||
"label": "Address",
|
||||
"description": "",
|
||||
"type": "text",
|
||||
"defaultValue": "127.0.0.1",
|
||||
"group": "SMTC Bridge"
|
||||
},
|
||||
{
|
||||
"id": "smtcBridgePort",
|
||||
"label": "Port",
|
||||
"description": "",
|
||||
"type": "text",
|
||||
"defaultValue": "5000",
|
||||
"group": "SMTC Bridge"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user