Fixed: podcasts may have .mp3 extension instead of .MP3 #1

Merged
mischa.spelt merged 1 commits from release/dev into main 2024-04-26 13:36:50 +02:00
Showing only changes of commit dee127eebf - Show all commits

View File

@@ -196,10 +196,14 @@ QUERY;
$files = [];
$size = 0;
while($duration--) {
$file = '/var/audio/uitzending/' . $currentHour->format('Ymd_Hi') . '.MP3';
if(!file_exists($file)) {
return abort(404);
}
$file = '/var/audio/uitzending/' . $currentHour->format('Ymd_Hi');
if(file_exists($file . '.mp3')) {
$file .= '.mp3';
} else if(file_exists($file . '.MP3')) {
$file .= '.MP3';
} else {
return abort(404);
}
$size += ($filesize = filesize($file));
$files[] = [$file, $filesize];