Skip to content

Commit

Permalink
https://github.com/WWBN/AVideo/issues/9453
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Oct 2, 2024
1 parent 79a42f9 commit 40afe95
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6067,12 +6067,23 @@ function getCDN($type = 'CDN', $id = 0)
$_getCDNURL[$index] = CDN::getURL($type, $id);
}
}

if ($type == 'CDN') {
if (!empty($global['ignoreCDN'])) {
return $global['webSiteRootURL'];
} elseif (!empty($advancedCustom) && !empty($advancedCustom->videosCDN) && isValidURL($advancedCustom->videosCDN)) {
} else if (!empty($advancedCustom) && !empty($advancedCustom->videosCDN) && isValidURL($advancedCustom->videosCDN)) {
$_getCDNURL[$index] = addLastSlash($advancedCustom->videosCDN);
} elseif (empty($_getCDNURL[$index])) {
} else {
$obj1 = AVideoPlugin::getDataObject('AWS_S3');
$obj2 = AVideoPlugin::getDataObject('Blackblaze_B2');
if (!empty($obj1) && isValidURL($obj1->CDN_Link)) {
$_getCDNURL[$index] = addLastSlash($obj1->CDN_Link);
} else if (!empty($obj2) && isValidURL($obj2->CDN_Link)) {
$_getCDNURL[$index] = addLastSlash($obj2->CDN_Link);
}
}

if (empty($_getCDNURL[$index])) {
$_getCDNURL[$index] = $global['webSiteRootURL'];
}
}
Expand Down
1 change: 1 addition & 0 deletions objects/video.php
Original file line number Diff line number Diff line change
Expand Up @@ -4186,6 +4186,7 @@ public static function getSourceFile($filename, $type = ".jpg", $includeS3 = fal
}
}
TimeLogEnd($timeLog1, __LINE__, $timeLog1Limit);
//var_dump(__LINE__, $type);exit;
/* need it because getDurationFromFile */
if ($includeS3 && preg_match('/\.(mp4|webm|mp3|ogg|pdf|zip|m3u8)$/i', $type)) {
if (isDummyFile($source['path'])) {
Expand Down

0 comments on commit 40afe95

Please sign in to comment.