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

This commit is contained in:
NH Gooi
2024-04-26 13:35:20 +02:00
parent e95a079593
commit dee127eebf

View File

@@ -196,8 +196,12 @@ QUERY;
$files = [];
$size = 0;
while($duration--) {
$file = '/var/audio/uitzending/' . $currentHour->format('Ymd_Hi') . '.MP3';
if(!file_exists($file)) {
$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);
}