diff --git a/now-playing/script.js b/now-playing/script.js index 5b9777c..1f83095 100644 --- a/now-playing/script.js +++ b/now-playing/script.js @@ -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 diff --git a/now-playing/settings/settings.json b/now-playing/settings/settings.json index 0dae766..622a8d8 100644 --- a/now-playing/settings/settings.json +++ b/now-playing/settings/settings.json @@ -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" } ] } \ No newline at end of file