mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
Wrong download button
This commit is contained in:
parent
6d2883076b
commit
c3ecb22e78
1 changed files with 362 additions and 356 deletions
|
@ -174,6 +174,8 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
|
||||
$videoHLSObj = AVideoPlugin::getDataObjectIfEnabled('VideoHLS');
|
||||
if (!empty($videoHLSObj)) {
|
||||
$cdnObj = AVideoPlugin::getDataObjectIfEnabled('CDN');
|
||||
if(!empty($cdnObj) && $cdnObj->enable_storage){
|
||||
if (!empty($videoHLSObj->saveMP4CopyOnCDNStorageToAllowDownload)) {
|
||||
$filesToDownload[] = VideoHLS::getCDNDownloadLink($video['id'], 'mp4');
|
||||
}
|
||||
|
@ -181,6 +183,7 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
$filesToDownload[] = VideoHLS::getCDNDownloadLink($video['id'], 'mp3');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!empty($filesToDownload)) {
|
||||
|
@ -258,6 +261,9 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
<div class="list-group list-group-horizontal">
|
||||
<?php
|
||||
foreach ($filesToDownload as $theLink) {
|
||||
if(empty($theLink)){
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/\.json/i', $theLink['url'])) {
|
||||
?>
|
||||
<button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>');"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue