mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update
This commit is contained in:
parent
e162f064b0
commit
e66c25145f
2 changed files with 18 additions and 3 deletions
|
@ -103,8 +103,9 @@ class CDN extends PluginAbstract
|
|||
$obj = $this->getDataObject();
|
||||
|
||||
$url = "https://youphp.tube/marketplace/CDN/iframe.php?hash={hash}";
|
||||
|
||||
$url = addQueryStringParameter($url, 'hash', $obj->key);
|
||||
if (empty($global['disableAdvancedConfigurations'])) {
|
||||
$url = addQueryStringParameter($url, 'hash', $obj->key);
|
||||
}
|
||||
$url = addQueryStringParameter($url, 'webSiteRootURL', $global['webSiteRootURL']);
|
||||
|
||||
$cdnMenu = str_replace('{url}', $url, $content);
|
||||
|
|
|
@ -51,10 +51,14 @@ function matchWithRequest($row)
|
|||
}
|
||||
|
||||
$liveFound = false;
|
||||
$isEnabledPayPerViewLive = AVideoPlugin::isEnabledByName("PayPerViewLive");
|
||||
if (AVideoPlugin::isEnabledByName('PlayLists')) {
|
||||
// try to get a live that is not a scheduled playlist
|
||||
$lives = LiveTransmitionHistory::getActiveLives('', false);
|
||||
foreach ($lives as $key => $value) {
|
||||
if ($isEnabledPayPerViewLive && !PayPerViewLive::canUserWatchNow(User::getId(), $value['users_id'])) {
|
||||
continue;
|
||||
}
|
||||
if (!Playlists_schedules::iskeyPlayListScheduled($value['key'])) {
|
||||
if (matchWithRequest($value)) {
|
||||
$liveVideo = $value;
|
||||
|
@ -65,8 +69,18 @@ if (AVideoPlugin::isEnabledByName('PlayLists')) {
|
|||
}
|
||||
}
|
||||
if (!$liveFound) {
|
||||
$liveVideo = Live::getLatest(true, $users_id, $categories_id);
|
||||
//$liveVideo = Live::getLatest(true, $users_id, $categories_id);
|
||||
|
||||
$activeLives = LiveTransmitionHistory::getActiveLives();
|
||||
foreach ($activeLives as $key => $value) {
|
||||
if ($isEnabledPayPerViewLive && !PayPerViewLive::canUserWatchNow(User::getId(), $value['users_id'])) {
|
||||
continue;
|
||||
}
|
||||
$liveVideo = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//var_dump($liveFound, $liveVideo);exit;
|
||||
if (!empty($liveVideo)) {
|
||||
setLiveKey($liveVideo['key'], $liveVideo['live_servers_id'], $liveVideo['live_index']);
|
||||
$poster = getURL(Live::getPosterImage($liveVideo['users_id'], $liveVideo['live_servers_id']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue