forked from tilderadio/archive
Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Ben Harris | 4a46ddc3ab | |
Ben Harris | 2cfef83762 | |
Ben Harris | d451710f2f | |
Ben Harris | 6aa828f2a1 | |
James Tomasino | d2659af09d | |
James Tomasino | 4b24c67dde | |
Ben Harris | 71559124a6 | |
Ben Harris | 48426d4677 |
|
@ -16,12 +16,13 @@
|
||||||
<hr>
|
<hr>
|
||||||
<?php
|
<?php
|
||||||
foreach (glob("/var/www/archive/*") as $dir) {
|
foreach (glob("/var/www/archive/*") as $dir) {
|
||||||
|
$archive_count = count(glob("$dir/*.mp3"));
|
||||||
$name = basename($dir);
|
$name = basename($dir);
|
||||||
if ($name == "webhook" || $name == "log" || !is_dir($dir)) continue;
|
if ($name == "webhook" || $name == "log" || !is_dir($dir)) continue;
|
||||||
?>
|
?>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<a href="<?=$name?>/" class="list-group-item">
|
<a href="<?=$name?>/" class="list-group-item">
|
||||||
<p class="list-group-item-text"><?=$name?></p>
|
<p class="list-group-item-text"><?=$name?> - <?=$archive_count?> archive<?=($archive_count == 1 ? '' : 's')?></p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -4,9 +4,12 @@ $json = json_decode(file_get_contents('php://input'), true);
|
||||||
|
|
||||||
$excluded_djs = [
|
$excluded_djs = [
|
||||||
"alrs",
|
"alrs",
|
||||||
|
"cat",
|
||||||
"dctrud",
|
"dctrud",
|
||||||
"epoch",
|
"epoch",
|
||||||
"vivi"
|
"rawktucc",
|
||||||
|
"ten_forward"
|
||||||
|
"vivi",
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($json["live"]["is_live"]) {
|
if ($json["live"]["is_live"]) {
|
||||||
|
@ -24,8 +27,8 @@ if ($json["live"]["is_live"]) {
|
||||||
copy(__DIR__."/../djindex.php", __DIR__."/../$streamer/index.php");
|
copy(__DIR__."/../djindex.php", __DIR__."/../$streamer/index.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
$standard_stream = "https://radio.tildeverse.org/radio/8000/radio.ogg";
|
$standard_stream = "https://azuracast.tilderadio.org/radio/8000/radio.ogg";
|
||||||
$testing_stream = "https://radio.tildeverse.org/radio/8010/radio.mp3";
|
$testing_stream = "https://azuracast.tilderadio.org/radio/8010/radio.mp3";
|
||||||
$metadata = "-metadata title=\"tilderadio archive - $timestamp\" -metadata artist=\"$streamer\"";
|
$metadata = "-metadata title=\"tilderadio archive - $timestamp\" -metadata artist=\"$streamer\"";
|
||||||
$cmd = "/usr/bin/ffmpeg -i $standard_stream $metadata ../$streamer/tilderadio-$streamer-$timestamp.mp3 >out.log 2>&1 & echo $!";
|
$cmd = "/usr/bin/ffmpeg -i $standard_stream $metadata ../$streamer/tilderadio-$streamer-$timestamp.mp3 >out.log 2>&1 & echo $!";
|
||||||
$pid = exec($cmd);
|
$pid = exec($cmd);
|
||||||
|
|
Loading…
Reference in New Issue