From ddd4e839d06c2f20c2b2899c5a9708335b2a3926 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 16 Nov 2021 18:21:26 +0400 Subject: [PATCH] Modified link to internal radio. And deleted /filelist and /playlist endpoints and moved them to nginx. --- radio/index.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/radio/index.js b/radio/index.js index 793a317..10b7270 100644 --- a/radio/index.js +++ b/radio/index.js @@ -13,7 +13,7 @@ const util = require("../shared/util"); async function getRadioStatus() { try { - let status = await fetch('http://radio.arav.home/status-json.xsl').then(r => r.json()); + let status = await fetch('http://radio.arav.home.arpa/status-json.xsl').then(r => r.json()); return { server_start_iso8601: status.icestats.server_start_iso8601, server_start_date: util.datetime(status.icestats.server_start_iso8601, util.post_date_format), @@ -56,16 +56,6 @@ function setRoutes() { last_songs: await getLastPlayedSongs() }); }) - .get('/filelist', async ctx => { - ctx.type = 'text/html'; - ctx.body = fs.readFileSync( - path.join(__dirname, '/static/radio_filelist.html')); - }) - .get('/playlist', async ctx => { - ctx.attachment('radio.arav.top.m3u'); - ctx.body = fs.readFileSync( - path.join(__dirname, '/static/assets/files/radio.arav.top.m3u')); - }) .get('/stats', async ctx => { ctx.body = await getRadioStatus(); })