forked from tilderadio/site
Compare commits
30 Commits
Author | SHA1 | Date |
---|---|---|
deepend | 036aa94ed3 | |
deepend | 5147f82859 | |
Mark Cornick | 0205a9b223 | |
Ben Harris | 4b0b058d76 | |
Santiago Forero | eedee8afd6 | |
Santiago Forero | c02cf1e929 | |
Ben Harris | b926b0d380 | |
Santiago Forero | 43d36bfeec | |
Ben Harris | 324ae061a5 | |
Lohan G | b7389d8907 | |
Ben Harris | 5025739ef6 | |
Ben Harris | 8efcdfab8c | |
Ben Harris | e5b4379406 | |
Ben Harris | af6bb5e0df | |
Ben Harris | 11f25e9707 | |
Santiago Forero | 1222388339 | |
Santiago Forero | b57596bd47 | |
Ben Harris | 54e91ab6e7 | |
Santiago Forero | 9cf094f4ef | |
Ben Harris | c006a40edf | |
Charles E. Lehner | 05e101f9e8 | |
Charles E. Lehner | 1e68d971c8 | |
Charles E. Lehner | a731a47f1c | |
deepend | 8916d836c5 | |
deepend | aec6cc49ba | |
Robert Miles | 03848b1924 | |
Robert Miles | d32fa86540 | |
Ben Harris | 8e9a7fed30 | |
deepend | 163d9991f8 | |
cat K. | 0f842a9c5c |
|
@ -21,6 +21,5 @@ trigger:
|
|||
steps:
|
||||
- name: deploy
|
||||
commands:
|
||||
- cd /usr/share/nginx/tilderadio.org
|
||||
- git pull origin master
|
||||
- git -C /usr/share/nginx/tilderadio.org pull --rebase origin master
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# redirect proper start
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
Redirect 302 /listen https://radio.tildeverse.org/radio/8000/radio.ogg
|
||||
Redirect 302 /listen https://azuracast.tilderadio.org/radio/8000/radio.ogg
|
||||
</IfModule>
|
||||
# redirect proper end
|
|
@ -2,3 +2,4 @@
|
|||
|
||||
tilderadio site. Very much inspired / borrowed from tildeverse.org.
|
||||
|
||||
Radio logo based on the radio emoji from Twemoji 13.0.2.
|
||||
|
|
|
@ -54,7 +54,7 @@ ontop = 1
|
|||
lcd_auto = 0
|
||||
|
||||
[Tilde]
|
||||
address = radio.tildeverse.org
|
||||
address = azuracast.tilderadio.org
|
||||
# live stream
|
||||
port = 8005
|
||||
# test stream
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
vertical-align: middle;
|
||||
border-left: 1px solid #626E7E;
|
||||
position: relative;
|
||||
/* Height here should be synced with $cell_height in ../schedule/calendar.php */
|
||||
height: 32px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
|
@ -72,6 +73,26 @@
|
|||
.calendar tbody tr td.hour span {
|
||||
display: block;
|
||||
}
|
||||
.calendar tbody tr td.active {
|
||||
border: 1px solid yellow;
|
||||
}
|
||||
#pointer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-top: 1px solid red;
|
||||
z-index: 1;
|
||||
}
|
||||
.pointer-label {
|
||||
color: red;
|
||||
}
|
||||
.pointer-label-wrapper {
|
||||
color: yellow;
|
||||
}
|
||||
.show-title {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
@media (max-width: 60em) {
|
||||
.calendar-wrapper {
|
||||
display: block;
|
||||
|
|
|
@ -1,21 +1,11 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://tilde.team/css/hacker.css">
|
||||
<title>tilderadio dj info</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<?php
|
||||
include __DIR__.'/../header.php';
|
||||
?>
|
||||
<h1>how to stream</h1>
|
||||
|
||||
<dl>
|
||||
<dt>Server:</dt>
|
||||
<dd>radio.tildeverse.org</dd>
|
||||
<dd>azuracast.tilderadio.org</dd>
|
||||
<dt>Port:</dt>
|
||||
<dd>8005</dd>
|
||||
<dt>Mount Name:</dt>
|
||||
|
@ -26,7 +16,7 @@
|
|||
<a href="https://www.azuracast.com/station-management/djs/streaming_software.html">
|
||||
azuracast wiki</a></p>
|
||||
<p>if you're having trouble, try setting your software to broadcast 128kbps mp3</p>
|
||||
<p><a href="butt.cfg.txt">example butt config</a></p>
|
||||
<p><a href="/butt.cfg.txt">example butt config</a></p>
|
||||
|
||||
<p>pulseaudio wizardry</p>
|
||||
<pre>
|
||||
|
@ -54,10 +44,8 @@ All volume sliders to 100%
|
|||
</pre>
|
||||
|
||||
<p>the test stream is available on port 8015 and you can listen to it
|
||||
<a href="https://radio.tildeverse.org/public/test">here</a>
|
||||
or <a href="https://radio.tildeverse.org/radio/8010/radio.ogg">here as ogg</a></p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<a href="https://azuracast.tilderadio.org/public/test">here</a>
|
||||
or <a href="https://azuracast.tilderadio.org/radio/8010/radio.ogg">here as ogg</a></p>
|
||||
|
||||
<?php
|
||||
include __DIR__.'/../footer.php';
|
3
dmca.php
3
dmca.php
|
@ -1,7 +1,4 @@
|
|||
<?php include 'header.php'; ?>
|
||||
<h1><a href="https://tilderadio.org"><img style="width:75px;" src="./logos/tilderadio-green.png">tilderadio.org</a></h1>
|
||||
<br>
|
||||
<br>
|
||||
<p><b>Digital Millennium Copyright Act ("DMCA")</b></p>
|
||||
|
||||
<p>tilderadio respects the intellectual property rights of others. Per the DMCA, tilderadio will respond expeditiously to claims of copyright infringement on the Site if submitted to tilderadio's Copyright Agent as described below. Upon receipt of a notice alleging copyright infringement, tilderadio will take whatever action it deems appropriate within its sole discretion, including removal of the allegedly infringing materials and termination of access for repeat infringers of copyright protected content.</p>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
</div>
|
||||
<footer class="text-center">
|
||||
<a href="https://tildegit.org/tilderadio/site">page source</a> | <a href="/dmca.php">DMCA</a>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
|
15
header.php
15
header.php
|
@ -8,8 +8,8 @@
|
|||
</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/css/hacker.css">
|
||||
<link rel="stylesheet" href="/css/calendar.css">
|
||||
<link rel="icon" type="image/png" href="https://tilderadio.org/logos/tilderadio-green.png"><?=isset($additional_head)?PHP_EOL." ".$additional_head.PHP_EOL:""?>
|
||||
<link rel="icon" type="image/png" href="/logos/tilderadio.png">
|
||||
<?=isset($additional_head) ? PHP_EOL . " " . $additional_head . PHP_EOL : ""?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -28,9 +28,18 @@
|
|||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/">home</a></li>
|
||||
<li><a href="/schedule/">schedule</a></li>
|
||||
<li><a href="/listen">listen now</a></li>
|
||||
</ul>
|
||||
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<br><br>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class="container">
|
||||
<h1>
|
||||
<a href="/"><img style="width:72px;margin-top:-30px;margin-right:5px;" src="/logos/tilderadio.png" alt="">tilderadio.org</a>
|
||||
</h1>
|
||||
<hr>
|
58
index.php
58
index.php
|
@ -1,32 +1,50 @@
|
|||
<?php include 'header.php'; ?>
|
||||
|
||||
<h1>
|
||||
<a href="/"><img style="width:75px;" src="./logos/tilderadio-green.png" alt="">tilderadio.org</a>
|
||||
</h1>
|
||||
<h4><?=json_decode(file_get_contents("https://bot.tildegit.org/api/slogan"))?></h4>
|
||||
|
||||
<p>
|
||||
TildeRadio is Internet radio streamed by / for users of the <a href="https://tildeverse.org/">tildeverse</a>.
|
||||
</p>
|
||||
|
||||
<p><a href="https://kiwi.tilde.chat/#tilderadio" target="_blank">Join us in #tilderadio</a>, our dedicated IRC channel on <a href="https://tilde.chat">tilde.chat</a></p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h4>how to listen</h4>
|
||||
<p><em><?php include 'schedule/nextdj.php'; ?></em></p>
|
||||
<blockquote><?=json_decode(file_get_contents("https://bot.tildegit.org/api/slogan"))?></blockquote>
|
||||
|
||||
<p>tilderadio is internet radio streamed by / for users of the <a href="https://tildeverse.org/">tildeverse</a>.</p>
|
||||
|
||||
<p>
|
||||
<iframe src="https://radio.tildeverse.org/public/tilderadio/embed" frameborder="0" allowtransparency="true" style="width: 100%; min-height: 160px; border: 0;"></iframe>
|
||||
<a href="https://tilde.chat/kiwi/#tilderadio" target="_blank">Join us in #tilderadio</a>,
|
||||
our dedicated IRC channel on <a href="https://tilde.chat">tilde.chat</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Or use the following links in your media player of choice:
|
||||
<ul>
|
||||
<li>https://radio.tildeverse.org/radio/8000/radio.ogg</li>
|
||||
<li>https://radio.tildeverse.org/radio/8000/radio.mp3</li>
|
||||
</ul>
|
||||
follow us on mastodon where we announce when DJ's go live!
|
||||
<a href="https://tilde.zone/@tilderadio" target="_blank">@tilderadio</a>
|
||||
</p>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
<h2>how to listen</h2>
|
||||
|
||||
<p>use the player at the bottom of the page, or use one of the following links in your media player of choice or visit them in your browser:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://tilderadio.org/listen">https://tilderadio.org/listen</a></li>
|
||||
<li>
|
||||
<a href="https://azuracast.tilderadio.org/radio/8000/radio.ogg">
|
||||
https://azuracast.tilderadio.org/radio/8000/radio.ogg</a> (default, 192 kbps ogg vorbis)
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://azuracast.tilderadio.org/radio/8000/320k.ogg">
|
||||
https://azuracast.tilderadio.org/radio/8000/320k.ogg</a> (320 kbps ogg vorbis)
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://azuracast.tilderadio.org/radio/8000/radio.mp3">
|
||||
https://azuracast.tilderadio.org/radio/8000/radio.mp3</a> (192 kbps mp3)
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://azuracast.tilderadio.org/radio/8000/320k.mp3">
|
||||
https://azuracast.tilderadio.org/radio/8000/320k.mp3</a> (320 kbps mp3)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<iframe src="https://azuracast.tilderadio.org/public/tilderadio/embed" style="width: 100%; min-height: 160px; border: 0;"></iframe>
|
||||
|
||||
<?php include 'footer.php'; ?>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
|
@ -1,3 +1,2 @@
|
|||
<?php
|
||||
$apikey = "my azuracast api key";
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<section class="calendar-wrapper">
|
||||
<h4>upcoming broadcasts</h4>
|
||||
<?php
|
||||
function check_in_range($start_date, $end_date, $checkdate) {
|
||||
$start_ts = strtotime($start_date);
|
||||
|
@ -19,16 +20,13 @@ $daterange = new DatePeriod($begin, new DateInterval('P1D'), $end);
|
|||
<th></th>
|
||||
<?php
|
||||
// Loop over our date range to draw the headers
|
||||
foreach($daterange as $date){
|
||||
?>
|
||||
foreach($daterange as $date){ ?>
|
||||
<th>
|
||||
<span class="day"><?php echo $date->format("d") ?></span>
|
||||
<span class="long"><?php echo $date->format("l") ?></span>
|
||||
<span class="short"><?php echo $date->format("D") ?></span>
|
||||
</th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -36,42 +34,59 @@ foreach($daterange as $date){
|
|||
// time will count us by 30-min increments through the day
|
||||
$time = mktime(0, 0, 0, 1, 1);
|
||||
// Loop over the day in 30 min increments
|
||||
for ($i = 0; $i < 86400; $i += 1800) {
|
||||
?>
|
||||
for ($i = 0; $i < 86400; $i += 1800) { ?>
|
||||
<tr>
|
||||
<?php
|
||||
// Only show row if we're on a full hour block. It's a rowspan 2
|
||||
if ((($i / 1800) % 2) === 0 ) {
|
||||
?>
|
||||
if ((($i / 1800) % 2) === 0 ) { ?>
|
||||
<td class="hour" rowspan="2"><span><?php echo date('H', $time + $i) ?>:00</span></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$now = new DateTime();
|
||||
$halfhour = new DateInterval('PT30M');
|
||||
$wrotepointer = false;
|
||||
// Loop over each day of the week for this 30 min span
|
||||
foreach ($daterange as $date) {
|
||||
// merge date (changing days) and time (incrementing by 30 min) to draw calendar by row.
|
||||
$merge = new DateTime($date->format('Y-m-d') . ' ' . date('H:i:s', $time + $i));
|
||||
// Set id for this time span, for referencing in JS.
|
||||
$props = 'id="show-' . $merge->getTimestamp() . '"';
|
||||
// We'll now use $merge to see if any shows are airing at this time
|
||||
$match = false;
|
||||
$matchedshow = null;
|
||||
foreach ($schedule as $show) {
|
||||
if (check_in_range($show['start'], $show['end'], $merge->format('Y-m-d H:i:s'))) {
|
||||
echo "<td>" . $show['title'] . "</td>\n";
|
||||
$match = true;
|
||||
$matchedshow = $show;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if no match was found, leave an empty node
|
||||
if (! $match) {
|
||||
echo "<td></td>\n";
|
||||
|
||||
$active = false;
|
||||
if (!$wrotepointer) {
|
||||
// If current time is in this range, draw pointer.
|
||||
$end = DateTimeImmutable::createFromMutable($merge)->add($halfhour);
|
||||
if ($now >= $merge && $now < $end) {
|
||||
$active = true;
|
||||
$props .= ' class="active"';
|
||||
}
|
||||
}
|
||||
echo "<td $props>";
|
||||
if ($matchedshow) {
|
||||
echo '<div class="show-title">' . $matchedshow['title'] . '</div>';
|
||||
// if no match was found, leave an empty node
|
||||
}
|
||||
if ($active) {
|
||||
// Cell height here should be synced with height of '.calendar tbody tr td' in ../css/calendar.css
|
||||
$height = 32;
|
||||
$top = round(date_diff($merge, $now)->format('%i') / 30 * ($height-1));
|
||||
echo '<div id="pointer" style="top:'.$top.'px"></div>';
|
||||
$wrotepointer = true;
|
||||
}
|
||||
echo "</td>\n";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
|
|
@ -25,10 +25,11 @@ echo "PRODID:tilderadio schedule".ICS_EOL;
|
|||
echo "DTSTAMP:" . ics_formatdate("now") . ICS_EOL;
|
||||
|
||||
// A list of event IDs that we have on the calendar, to avoid duplication
|
||||
$event_ids = array();
|
||||
$event_ids = [];
|
||||
|
||||
foreach ($schedule as $event) {
|
||||
$id = strval($event["id"]) . gmdate("DHis", strtotime($event["start"])) . gmdate("DHis", strtotime($event["end"]));
|
||||
|
||||
if (!in_array($id,$event_ids)) {
|
||||
array_push($event_ids, $id);
|
||||
// The VEVENT structure's pretty easy to generate, especially since we're already in UTC.
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
<?php
|
||||
$additional_head='<link rel="alternate" type="text/calendar" href="https://tilderadio.org/schedule/ics.php">';
|
||||
include '../header.php';
|
||||
$additional_head='<link rel="stylesheet" href="/css/calendar.css">
|
||||
<link rel="alternate" type="text/calendar" href="https://tilderadio.org/schedule/ics.php">';
|
||||
include __DIR__ . '/../header.php';
|
||||
include 'schedule.php';
|
||||
?>
|
||||
|
||||
<h1><a href="https://tilderadio.org"><img style="width:75px;" src="../logos/tilderadio-green.png">tilderadio.org</a></h1>
|
||||
<h4>upcoming broadcasts</h4>
|
||||
<p>all times in UTC. current time is <span id="utcdate"><?=formatdate("now")?></span>.</p>
|
||||
<p>this schedule is also available in <a href="https://icalendar.org/validator.html?url=https://tilderadio.org/schedule/ics.php">iCalendar format</a>. point your calendar client at <code>https://tilderadio.org/schedule/ics.php</code>.</p>
|
||||
<p>
|
||||
all times in UTC. current time is <span id="utcdate"><?=formatdate("now")?></span>
|
||||
<span class="pointer-label-wrapper">(</span><span class="pointer-label">—</span><span class="pointer-label-wrapper">)</span>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
this schedule is also available in <a href="https://icalendar.org/validator.html?url=https://tilderadio.org/schedule/ics.php">iCalendar format</a>.
|
||||
point your calendar client at <code>https://tilderadio.org/schedule/ics.php</code>.
|
||||
</p>
|
||||
|
||||
<?php
|
||||
include 'calendar.php';
|
||||
|
@ -33,16 +39,83 @@ include 'calendar.php';
|
|||
</table>
|
||||
|
||||
<script>
|
||||
// Update the timer as time passes.
|
||||
let halfHour = 1800000;
|
||||
// Gather schedule table cells by timestamp
|
||||
const cells = document.querySelectorAll('.calendar tbody td');
|
||||
let ranges = [];
|
||||
for (const cell of Array.from(cells)) {
|
||||
const m = /^show-(\d*)$/.exec(cell.id);
|
||||
if (!m) continue;
|
||||
ranges.push({
|
||||
startTime: m[1]*1000,
|
||||
cell,
|
||||
});
|
||||
}
|
||||
ranges.sort((a, b) => {
|
||||
return a.startTime - b.startTime;
|
||||
});
|
||||
let currentRangeI = 0;
|
||||
|
||||
function getCurrentRange(now) {
|
||||
for (i = currentRangeI; i < ranges.length; i++) {
|
||||
const range = ranges[i];
|
||||
if (!range) continue;
|
||||
const rangeStart = range.startTime;
|
||||
if (rangeStart <= now && (rangeStart + halfHour) > now) {
|
||||
return range;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update the timer and pointer as time passes.
|
||||
// Because PHP gives the time on page load, people who disable Javascript won't be missing out on much.
|
||||
let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||||
let daysOfWeek = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
||||
|
||||
function update_date() {
|
||||
var d = new Date();
|
||||
document.getElementById("utcdate").innerText = daysOfWeek[d.getUTCDay()]+" "+months[d.getUTCMonth()]+" "+d.getUTCDate().toString()+" "+d.getUTCHours().toString().padStart(2,'0')+":"+d.getUTCMinutes().toString().padStart(2,'0');
|
||||
document.getElementById("utcdate").innerText =
|
||||
daysOfWeek[d.getUTCDay()] + " " + months[d.getUTCMonth()] + " " +
|
||||
d.getUTCDate().toString() + " " + d.getUTCHours().toString().padStart(2,'0') +
|
||||
":" + d.getUTCMinutes().toString().padStart(2,'0');
|
||||
setTimeout(update_date, 15000);
|
||||
updatePointer(d);
|
||||
}
|
||||
setTimeout(update_date, 15000);
|
||||
|
||||
let pointer = document.getElementById("pointer");
|
||||
// Create pointer in case it wasn't added in the page generation.
|
||||
if (!pointer) {
|
||||
pointer = document.createElement('div');
|
||||
pointer.id = 'pointer';
|
||||
}
|
||||
|
||||
let prevRange = getCurrentRange(new Date().getTime());
|
||||
function updatePointer(d) {
|
||||
// Find current cell
|
||||
const range = getCurrentRange(d.getTime());
|
||||
if (!range) {
|
||||
// Done with schedule. Remove pointer. Need to refresh.
|
||||
if (prevRange) {
|
||||
prevRange.cell.removeChild(pointer);
|
||||
prevRange.cell.classList.remove('active');
|
||||
prevRange = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Move pointer to different cell if changed cell.
|
||||
if (range !== prevRange) {
|
||||
if (prevRange) prevRange.cell.classList.remove('active');
|
||||
range.cell.classList.add('active');
|
||||
range.cell.appendChild(pointer);
|
||||
prevRange = range;
|
||||
}
|
||||
// Move pointer based on time in current cell.
|
||||
const progress = (d.getTime() - range.startTime) / halfHour;
|
||||
pointer.style.top = (progress * (range.cell.offsetHeight - 1)).toFixed(0) + 'px';
|
||||
}
|
||||
// Update pointer immediately
|
||||
updatePointer(new Date());
|
||||
</script>
|
||||
|
||||
<?php include '../footer.php'; ?>
|
||||
<?php include __DIR__.'/../footer.php'; ?>
|
||||
|
|
|
@ -19,7 +19,7 @@ if (empty($apikey)) {
|
|||
|
||||
$schedule = json_decode(
|
||||
file_get_contents(
|
||||
"https://radio.tildeverse.org/api/station/1/schedule?rows=2",
|
||||
"https://azuracast.tilderadio.org/api/station/1/schedule?rows=2",
|
||||
false,
|
||||
$context
|
||||
),
|
||||
|
@ -36,6 +36,7 @@ if (isset($_GET["json"]) && $_GET["json"] === "yes") {
|
|||
$data = $schedule[1];
|
||||
}
|
||||
echo $data["name"] . " will stream at " . gmdate("D M d H:i", strtotime($data["start"])) . " UTC (in ";
|
||||
|
||||
$diff = strtotime($data["start"]) - strtotime("now");
|
||||
if ($diff < 60) {
|
||||
echo "" . $diff . " seconds)";
|
||||
|
|
|
@ -19,13 +19,13 @@ if (empty($apikey)) {
|
|||
|
||||
// allow ics.php to overwrite $from and $to
|
||||
if (!isset($from, $to)) {
|
||||
$from = gmdate("Y-m-d\TH:i:s\Z", strtotime("now + 1 day"));
|
||||
$to = gmdate("Y-m-d\TH:i:s\Z", strtotime("now + 8 days"));
|
||||
$from = gmdate("Y-m-d\TH:i:s\Z", strtotime("today"));
|
||||
$to = gmdate("Y-m-d\TH:i:s\Z", strtotime("today + 8 days"));
|
||||
}
|
||||
|
||||
$schedule = json_decode(
|
||||
file_get_contents(
|
||||
"https://radio.tildeverse.org/api/station/1/streamers/schedule?start=$from&end=$to",
|
||||
"https://azuracast.tilderadio.org/api/station/1/streamers/schedule?start=$from&end=$to",
|
||||
false,
|
||||
$context
|
||||
),
|
||||
|
|
|
@ -28,4 +28,5 @@ Dizzy? We stop the world from spinning
|
|||
Where Disney Princesses Go Slumming
|
||||
any slogan but "eat the poop or die"
|
||||
that's not what she said!
|
||||
not product placement, we promise! (tildestore.com)
|
||||
not product placement, we promise! (shop.tildeverse.org)
|
||||
SYNTH TUBA JAZZ VOMIT
|
||||
|
|
Loading…
Reference in New Issue