' ?> " rel="self" type="application/rss+xml" /> <![CDATA[ <?php echo feedText($title); ?> ]]> ]]> hourly 1 en false ]]> ]]> ]]> ]]> <![CDATA[ <?php echo feedText($title); ?> ]]> 144 40 RSS null, 'mp4' => null, 'other' => null]; foreach ($files as $value) { if ( ($value["type"] === Video::$videoTypeVideo || $value["type"] === Video::$videoTypeAudio) && file_exists($value['path']) ) { $path_parts = pathinfo($value['path']); $ext = strtolower($path_parts['extension']); // Determine the correct MIME type based on file extension switch ($ext) { case 'mp3': $value['mime'] = 'audio/mpeg'; break; case 'mp4': $value['mime'] = 'video/mp4'; break; case 'm3u8': $value['mime'] = 'application/x-mpegURL'; break; default: $value['mime'] = "video/{$ext}"; } // Get file size and ensure HTTPS for validation $value['size'] = filesize($value['path']); $value['url'] = str_replace("http://", "https://", $value['url']); // Prepare the enclosure tag $enclosureTag = ''; // Store the enclosure based on priority if ($ext === 'mp3' && !$enclosureOptions['mp3']) { $enclosureOptions['mp3'] = $enclosureTag; } elseif ($ext === 'mp4' && !$enclosureOptions['mp4']) { $enclosureOptions['mp4'] = $enclosureTag; } elseif (!$enclosureOptions['other']) { $enclosureOptions['other'] = $enclosureTag; } } } // Choose the enclosure according to priority: mp3 > mp4 > other if ($enclosureOptions['mp3']) { $selectedEnclosure = $enclosureOptions['mp3']; } elseif ($enclosureOptions['mp4']) { $selectedEnclosure = $enclosureOptions['mp4']; } elseif ($enclosureOptions['other']) { $selectedEnclosure = $enclosureOptions['other']; } ?> <![CDATA[ <?php echo feedText($row['title']); ?> ]]> ]]> '; } if (!is_string($feed)) { $feed = json_encode($feed); } echo $feed;