1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
Daniel Neto 2025-03-29 09:41:30 -03:00
parent bfcabe6dfc
commit aa817608fd
3 changed files with 6 additions and 2 deletions

View file

@ -6,7 +6,7 @@ $cacheFeedName = "feedCacheMRSS" . json_encode($_REQUEST);
$lifetime = 43200; $lifetime = 43200;
$feed = ObjectYPT::getCache($cacheFeedName, $lifetime); $feed = ObjectYPT::getCache($cacheFeedName, $lifetime);
$link = "{$link}/mrss"; $link = "{$link}/mrss";
$recreate = (!empty($_REQUEST['recreate']) && !isBot()); $recreate = recreateCache();
if (empty($feed) || $recreate) { if (empty($feed) || $recreate) {
_ob_start(); _ob_start();
echo'<?xml version="1.0" encoding="UTF-8"?>'; ?> echo'<?xml version="1.0" encoding="UTF-8"?>'; ?>

View file

@ -532,3 +532,6 @@ function escapeshellcmdURL(string $command)
return str_replace('\?', '?', escapeshellcmd($command)); return str_replace('\?', '?', escapeshellcmd($command));
} }
function recreateCache(){
return (!empty($_REQUEST['recreate']) && !isBot());
}

View file

@ -4907,7 +4907,8 @@ if (!class_exists('Video')) {
public static function getSourceFileURL($filename, $includeS3 = false, $fileType = '') public static function getSourceFileURL($filename, $includeS3 = false, $fileType = '')
{ {
$sources = self::getVideosPaths($filename, $includeS3); $recreate = recreateCache();
$sources = self::getVideosPaths($filename, $includeS3, 0, $recreate);
if (empty($fileType) || $fileType == 'audio') { if (empty($fileType) || $fileType == 'audio') {
if (!empty($sources['mp3'])) { if (!empty($sources['mp3'])) {
return $sources['mp3']; return $sources['mp3'];