The addition of a ccdn redirector and updating the link to media to point to it

This commit is contained in:
2024-10-21 17:35:20 +02:00
parent faa14cd6da
commit b2708a2b3f
2 changed files with 94 additions and 19 deletions

View File

@@ -60,11 +60,6 @@ switch ($atomurl) {
$mimetype = "audio/mpeg";
$feed = "tenday";
break;
case "/rss1.php":
$format = "spx";
$mimetype = "audio/ogg";
$feed = "tenday";
break;
}
require "/home/hpr/php/include.php";
@@ -237,20 +232,8 @@ if ($result = mysqli_query($connection, $query)) {
else{
$episode_explicit = "Explicit";
}
$url="http://hackerpublicradio.org/eps/hpr${id}${version}";
if (isset($_GET['hostidinfilename'])) {
$hostidinfilename = $_GET['hostidinfilename'];
if ( $hostidinfilename === "1" ) {
$url = $url . "_host-" . htmlspecialchars(stripslashes(strip_tags($row["hostid"])));
}
}
if ( isset($_GET['seriesidinfilename']) ) {
$seriesidinfilename = $_GET['seriesidinfilename'];
if ( $seriesidinfilename === "1" ) {
$url = $url . "_series-" . htmlspecialchars(stripslashes(strip_tags($row["series"])));
}
}
$url = $url . "." . $format;
$url="https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr${id}/hpr${id}.${format}";
$itunes_summary = htmlspecialchars(stripslashes(strip_tags(substr($row["notes"],0,4000))));
if ( $html == 1 ) {