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