Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 12, 2025
1 parent ed308d6 commit c390698
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions objects/video.php
Original file line number Diff line number Diff line change
Expand Up @@ -4916,7 +4916,7 @@ public static function getSourceFileURL($filename, $includeS3 = false, $fileType
return false;
}

public static function getVideosPaths($filename, $includeS3 = false, $try = 0)
public static function getVideosPaths($filename, $includeS3 = false, $try = 0, $recreate = false)
{
global $global;

Expand All @@ -4926,7 +4926,7 @@ public static function getVideosPaths($filename, $includeS3 = false, $try = 0)

$tmpCacheFile = getVideosDir() . "permanentCache" . DIRECTORY_SEPARATOR . "getVideosPaths_{$filename}_" . ($includeS3 ? 1 : 0) . ".tmp";

if (!empty($cache)) {
if (!empty($cache) && empty($recreate)) {
$obj = object_to_array(_json_decode($cache));
if (!file_exists($tmpCacheFile)) {
file_put_contents($tmpCacheFile, json_encode($cache));
Expand All @@ -4935,7 +4935,7 @@ public static function getVideosPaths($filename, $includeS3 = false, $try = 0)
_error_log("getVideosPaths($filename) line=".__LINE__);
}
return $obj;
} elseif (empty($global['disableAsyncGetVideosPaths']) && file_exists($tmpCacheFile)) {
} elseif (empty($global['disableAsyncGetVideosPaths']) && file_exists($tmpCacheFile) && empty($recreate)) {
_error_log("getVideosPaths($filename) 1 tmpCacheFile=$tmpCacheFile " . json_encode(ObjectYPT::getLastUsedCacheInfo()));
// Execute the async process to generate the cache
$device = getDeviceName('web');
Expand Down

0 comments on commit c390698

Please sign in to comment.