commit 03dace86cf0f5b58f766c0f4e5b71dcb7ce7806d
parent d24a91dd46a89f26f44c581a4921ea484504e5e2
Author: libredev <libredev@ircforever.org>
Date: Thu, 23 Feb 2023 17:16:32 +0530
fix url
Diffstat:
M | main.c | | | 18 | ++---------------- |
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/main.c b/main.c
@@ -19,8 +19,6 @@
#include "http.h"
#include "pdjson/pdjson.h"
-static const char BASE_URL[] = "https://theinterlude.live";
-
struct icestats {
char *admin;
char *host;
@@ -173,18 +171,6 @@ source_set(struct source *s, json_stream *json, const char *key)
strcpy(s->url, "/stream/");
strcat(s->url, s->server_name);
format_to_url(s->url);
- } else if (var == &s->listenurl) {
- char *url;
- int i;
-
- url = s->listenurl;
- for (i = 0; i < 3; i++) {
- if ((url = strchr(++url, '/')) == NULL)
- fatal("invalid listenurl: %s\n", s->listenurl);
- }
- url = strdup(url);
- free(*var);
- *var = url;
}
}
}
@@ -197,8 +183,8 @@ source_print(struct source *s)
/* thumbnail and player */
puts("<div class='player'>");
puts("<img src='/music.svg' alt='thumbnail' width='256' height='256'>");
- puts("<audio controls='controls' preload='none'>");
- printf("<source src='%s%s' type='application/ogg'>\n", BASE_URL, s->listenurl);
+ puts("<audio controls>");
+ printf("<source src='%s' type='application/ogg'>\n", s->listenurl);
puts("Your browser does not support the video tag.");
puts("</audio>");
puts("</div>");