aboutsummaryrefslogtreecommitdiff
path: root/src/js/radio-emulator.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-12-03 15:21:23 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-12-03 15:21:23 +0200
commit8dd45fe02ef44fae11bee385d6d226c471b99d26 (patch)
tree85d67f2e318dd0f8244565f11fc8969b2d1867c6 /src/js/radio-emulator.js
parenta9a97d9495b67258c2eeab196ce860a010cff466 (diff)
downloadarching-kaos-web-ui-8dd45fe02ef44fae11bee385d6d226c471b99d26.tar.gz
arching-kaos-web-ui-8dd45fe02ef44fae11bee385d6d226c471b99d26.tar.bz2
arching-kaos-web-ui-8dd45fe02ef44fae11bee385d6d226c471b99d26.zip
Load radio api address from settings
Diffstat (limited to 'src/js/radio-emulator.js')
-rw-r--r--src/js/radio-emulator.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/js/radio-emulator.js b/src/js/radio-emulator.js
index 0926d2a..9c9d27e 100644
--- a/src/js/radio-emulator.js
+++ b/src/js/radio-emulator.js
@@ -30,14 +30,16 @@
// - show_info
//
import { makeElement } from "./arching-kaos-generator.js";
+import { getSettings } from "./arching-kaos-web-ui-settings.js";
import { generateImage } from "./image-generator.js";
var debugMode = false;
-const apiURL = "http://z.kaotisk-hund.com:8010/";
+const settings = getSettings();
+const apiURL = settings.ak.radio.list[settings.ak.radio.active];
const version = "v0";
-const listRequest = `${apiURL}${version}/list`
-const jsonRequest = `${apiURL}${version}/application/json/`
-const audioRequest = `${apiURL}${version}/audio/ogg/`
+const listRequest = `${apiURL}/${version}/list`
+const jsonRequest = `${apiURL}/${version}/application/json/`
+const audioRequest = `${apiURL}/${version}/audio/ogg/`
const documentTitle = "Radio Station Emulator";
const separator = " :: ";